diff --git a/hw/xwayland/xwayland-input.c b/hw/xwayland/xwayland-input.c index 0ef073f64..d45bee410 100644 --- a/hw/xwayland/xwayland-input.c +++ b/hw/xwayland/xwayland-input.c @@ -2762,6 +2762,9 @@ xwl_seat_maybe_lock_on_hidden_cursor(struct xwl_seat *xwl_seat) !xwl_seat->cursor_confinement_window) return FALSE; + if (!xwl_seat->focus_window) + return FALSE; + if (xwl_seat->confined_pointer) xwl_seat_destroy_confined_pointer(xwl_seat);