path: root/sway/input/seatop_default.c
diff options
authorLibravatar Tudor Brindus <me@tbrindus.ca>2020-05-20 23:45:43 -0400
committerLibravatar Simon Ser <contact@emersion.fr>2020-05-28 09:44:00 +0200
commit6ea45395c70939a6d855736cabfe75ad9cf4a0ae (patch)
tree8f5bf05b1e210485aba9c93b4b897dac3310f595 /sway/input/seatop_default.c
parentLog Xwayland startup failures (diff)
input/pointer: send pointer enter event on confine warp
The spec has this to say about sending events on confine creation: Whenever the confinement is activated, it is guaranteed that the surface the pointer is confined to will already have received pointer focus and that the pointer will be within the region passed to the request creating this object. ...and on region update: If warped, a wl_pointer.motion event will be emitted, but no wp_relative_pointer.relative_motion event. Prior to this patch, sway did neither, and updated the hardware cursor position without notifying the underlying surface until the next motion event. This led to inconsistent results, especially in applications that draw their own software cursor.
Diffstat (limited to 'sway/input/seatop_default.c')
1 files changed, 1 insertions, 0 deletions
diff --git a/sway/input/seatop_default.c b/sway/input/seatop_default.c
index 32c7318b..048bad75 100644
--- a/sway/input/seatop_default.c
+++ b/sway/input/seatop_default.c
@@ -656,6 +656,7 @@ static void handle_rebase(struct sway_seat *seat, uint32_t time_msec) {
656 if (surface) { 656 if (surface) {
657 if (seat_is_input_allowed(seat, surface)) { 657 if (seat_is_input_allowed(seat, surface)) {
658 wlr_seat_pointer_notify_enter(seat->wlr_seat, surface, sx, sy); 658 wlr_seat_pointer_notify_enter(seat->wlr_seat, surface, sx, sy);
659 wlr_seat_pointer_notify_motion(seat->wlr_seat, time_msec, sx, sy);
659 } 660 }
660 } else { 661 } else {
661 cursor_update_image(cursor, e->previous_node); 662 cursor_update_image(cursor, e->previous_node);