diff options
| author | Isaac Freund <ifreund@ifreund.xyz> | 2020-12-27 16:11:52 +0100 |
|---|---|---|
| committer | Isaac Freund <ifreund@ifreund.xyz> | 2020-12-27 16:11:52 +0100 |
| commit | 055fba5c3c9f4a6c8cd248507cfee299deca32e0 (patch) | |
| tree | ac3b940d6f6775b17e82fdda5fc7b4947b9b9ba8 | |
| parent | 4be1d59861af28a3692a70960546306d3a372ef9 (diff) | |
| download | river-055fba5c3c9f4a6c8cd248507cfee299deca32e0.tar.gz river-055fba5c3c9f4a6c8cd248507cfee299deca32e0.tar.xz | |
cursor: fix motion coords sent in down mode
We need to subtract the coords of the actual surface as they may not
alingn with the current box if using CSD.
| -rw-r--r-- | river/Cursor.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/river/Cursor.zig b/river/Cursor.zig index 3fde7d4..f1dff59 100644 --- a/river/Cursor.zig +++ b/river/Cursor.zig @@ -478,8 +478,8 @@ fn processMotion(self: *Self, device: *wlr.InputDevice, time: u32, delta_x: f64, self.wlr_cursor.move(device, delta_x, delta_y); self.seat.wlr_seat.pointerNotifyMotion( time, - self.wlr_cursor.x - @intToFloat(f64, view.current.box.x), - self.wlr_cursor.y - @intToFloat(f64, view.current.box.y), + self.wlr_cursor.x - @intToFloat(f64, view.current.box.x - view.surface_box.x), + self.wlr_cursor.y - @intToFloat(f64, view.current.box.y - view.surface_box.y), ); }, .move => |view| { |
