Commit d1753bf7 authored by Olivier Fourdan's avatar Olivier Fourdan
Browse files

xwayland: Destroy the warp emulator on leave



The pointer may leave a surface with a warp emulator active without any
pointer motion event, just by mapping/unmapping or restacking windows.

Destroy the warp emulator when the pointer leaves the surface, not just
on motion events.
Signed-off-by: default avatarOlivier Fourdan <ofourdan@redhat.com>
xorg/xserver#1087
parent 1626e9fa
Pipeline #216297 passed with stages
in 13 minutes and 59 seconds
......@@ -466,10 +466,15 @@ pointer_handle_leave(void *data, struct wl_pointer *pointer,
xwl_seat->xwl_screen->serial = serial;
/* The pointer has left a known xwindow, save it for a possible match
* in sprite_check_lost_focus()
*/
if (xwl_seat->focus_window) {
if (xwl_seat->pointer_warp_emulator) {
if (xwl_seat->focus_window == xwl_seat->pointer_warp_emulator->locked_window)
xwl_seat_destroy_pointer_warp_emulator(xwl_seat);
}
/* The pointer has left a known xwindow, save it for a possible match
* in sprite_check_lost_focus()
*/
xwl_seat->last_xwindow = xwl_seat->focus_window->window;
xwl_seat->focus_window = NULL;
CheckMotion(NULL, GetMaster(dev, POINTER_OR_FLOAT));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment