diff options
author | Simon Ser <contact@emersion.fr> | 2023-01-16 19:12:33 +0100 |
---|---|---|
committer | Simon Zeni <simon@bl4ckb0ne.ca> | 2023-01-18 11:23:05 -0500 |
commit | 6a3e265326fab11b8f68374c9f30410f647ae866 (patch) | |
tree | a365ec27dcbf1b28c215c121bb625870aef20455 /sway/input/seat.c | |
parent | Fix indentation in surface_is_xdg_popup() (diff) | |
download | sway-6a3e265326fab11b8f68374c9f30410f647ae866.tar.gz sway-6a3e265326fab11b8f68374c9f30410f647ae866.tar.zst sway-6a3e265326fab11b8f68374c9f30410f647ae866.zip |
Fix pointer events for ext-session-lock surfaces
We were never sending any pointer event to ext-session-lock
surfaces.
Diffstat (limited to 'sway/input/seat.c')
-rw-r--r-- | sway/input/seat.c | 15 |
1 files changed, 13 insertions, 2 deletions
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) { | |||
1089 | 1089 | ||
1090 | bool seat_is_input_allowed(struct sway_seat *seat, | 1090 | bool seat_is_input_allowed(struct sway_seat *seat, |
1091 | struct wlr_surface *surface) { | 1091 | struct wlr_surface *surface) { |
1092 | if (server.session_lock.locked) { | ||
1093 | if (server.session_lock.lock == NULL) { | ||
1094 | return false; | ||
1095 | } | ||
1096 | struct wlr_session_lock_surface_v1 *lock_surf; | ||
1097 | wl_list_for_each(lock_surf, &server.session_lock.lock->surfaces, link) { | ||
1098 | if (lock_surf->surface == surface) { | ||
1099 | return true; | ||
1100 | } | ||
1101 | } | ||
1102 | return false; | ||
1103 | } | ||
1092 | struct wl_client *client = wl_resource_get_client(surface->resource); | 1104 | struct wl_client *client = wl_resource_get_client(surface->resource); |
1093 | return seat->exclusive_client == client || | 1105 | return seat->exclusive_client == client || seat->exclusive_client == NULL; |
1094 | (seat->exclusive_client == NULL && !server.session_lock.locked); | ||
1095 | } | 1106 | } |
1096 | 1107 | ||
1097 | static void send_unfocus(struct sway_container *con, void *data) { | 1108 | static void send_unfocus(struct sway_container *con, void *data) { |