From 6a3e265326fab11b8f68374c9f30410f647ae866 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Mon, 16 Jan 2023 19:12:33 +0100 Subject: Fix pointer events for ext-session-lock surfaces We were never sending any pointer event to ext-session-lock surfaces. --- sway/input/seat.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'sway/input/seat.c') diff --git a/sway/input/seat.c b/sway/input/seat.c index 18b63715..090a4d3c 100644 --- a/sway/input/seat.c +++ b/sway/input/seat.c @@ -1089,9 +1089,20 @@ void seat_configure_xcursor(struct sway_seat *seat) { bool seat_is_input_allowed(struct sway_seat *seat, struct wlr_surface *surface) { + if (server.session_lock.locked) { + if (server.session_lock.lock == NULL) { + return false; + } + struct wlr_session_lock_surface_v1 *lock_surf; + wl_list_for_each(lock_surf, &server.session_lock.lock->surfaces, link) { + if (lock_surf->surface == surface) { + return true; + } + } + return false; + } struct wl_client *client = wl_resource_get_client(surface->resource); - return seat->exclusive_client == client || - (seat->exclusive_client == NULL && !server.session_lock.locked); + return seat->exclusive_client == client || seat->exclusive_client == NULL; } static void send_unfocus(struct sway_container *con, void *data) { -- cgit v1.2.3