aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIsaac Freund <ifreund@ifreund.xyz>2020-09-08 18:54:57 +0200
committerIsaac Freund <ifreund@ifreund.xyz>2020-09-08 18:54:57 +0200
commit976a3ce73d3f83c94576e1220bebbaf79cc8c0e5 (patch)
tree4e0378c054900251dcf2f4876f125e4475b9c876
parent989e7aaeda44b02bdb92455dfe7b58dafc28435c (diff)
downloadriver-976a3ce73d3f83c94576e1220bebbaf79cc8c0e5.tar.gz
river-976a3ce73d3f83c94576e1220bebbaf79cc8c0e5.tar.xz
cursor: handle borderless views in move/resize
-rw-r--r--river/Cursor.zig6
1 files changed, 5 insertions, 1 deletions
diff --git a/river/Cursor.zig b/river/Cursor.zig
index c84c3af..d9d0696 100644
--- a/river/Cursor.zig
+++ b/river/Cursor.zig
@@ -109,7 +109,7 @@ const Mode = union(enum) {
}
fn processMotion(self: *Self, device: *c.wlr_input_device, time: u32, delta_x: f64, delta_y: f64) void {
- const border_width = self.seat.input_manager.server.config.border_width;
+ const config = self.seat.input_manager.server.config;
switch (self.mode) {
.passthrough => {
@@ -126,6 +126,8 @@ const Mode = union(enum) {
);
},
.move => |view| {
+ const border_width = if (view.draw_borders) config.border_width else 0;
+
var output_width: c_int = undefined;
var output_height: c_int = undefined;
c.wlr_output_effective_resolution(view.output.wlr_output, &output_width, &output_height);
@@ -152,6 +154,8 @@ const Mode = union(enum) {
view.applyPending();
},
.resize => |data| {
+ const border_width = if (data.view.draw_borders) config.border_width else 0;
+
var output_width: c_int = undefined;
var output_height: c_int = undefined;
c.wlr_output_effective_resolution(data.view.output.wlr_output, &output_width, &output_height);