summaryrefslogtreecommitdiff
path: root/sway/input/seat.c
diff options
context:
space:
mode:
authorDrew DeVault <[email protected]>2018-04-08 12:42:56 -0400
committerDrew DeVault <[email protected]>2018-04-08 12:42:56 -0400
commit9c5a88a7bd57dc9710c0fe779d8403a87ddc0b6a (patch)
treed154691ce597acb68cba20160ef324f22fa45eba /sway/input/seat.c
parentebabcc8b44846eaccdd34e3e48aa07d6bf7b58a7 (diff)
Fix cursor motion issues
Use only one canonical cursor x/y position and send cursor enter when mouse is warped. Tangentally related to #1714
Diffstat (limited to 'sway/input/seat.c')
-rw-r--r--sway/input/seat.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sway/input/seat.c b/sway/input/seat.c
index c34da5e5..d9b42828 100644
--- a/sway/input/seat.c
+++ b/sway/input/seat.c
@@ -434,6 +434,9 @@ void seat_set_focus_warp(struct sway_seat *seat,
wlr_output, seat->cursor->cursor->x,
seat->cursor->cursor->y)) {
wlr_cursor_warp(seat->cursor->cursor, NULL, x, y);
+ struct timespec now;
+ clock_gettime(CLOCK_MONOTONIC, &now);
+ cursor_send_pointer_motion(seat->cursor, now.tv_nsec / 1000);
}
}
}