diff --git a/hw/xwayland/xwayland-input.c b/hw/xwayland/xwayland-input.c index 35905829e..f7a8d2165 100644 --- a/hw/xwayland/xwayland-input.c +++ b/hw/xwayland/xwayland-input.c @@ -616,21 +616,19 @@ pointer_handle_leave(void *data, struct wl_pointer *pointer, { struct xwl_seat *xwl_seat = data; struct xwl_screen *xwl_screen = xwl_seat->xwl_screen; - Bool focus_lost = FALSE; xwl_screen->serial = serial; + if (xwl_screen->rootless) + xwl_seat_leave_ptr(xwl_seat, !!xwl_seat->focus_window); + /* The pointer has left a known xwindow, save it for a possible match * in sprite_check_lost_focus() */ if (xwl_seat->focus_window) { xwl_seat->last_focus_window = xwl_seat->focus_window; xwl_seat->focus_window = NULL; - focus_lost = TRUE; } - - if (xwl_screen->rootless) - xwl_seat_leave_ptr(xwl_seat, focus_lost); } static void