Rework session lock keyboard focus handling

When removing outputs, it is possible to end up in a situation where
none of the session lock client's surfaces have keyboard focus,
resulting in it not receiving keyboard events.  Track the focused
surface and update it as needed on surface destroy.
This commit is contained in:
Daniel De Graaf 2022-04-29 23:40:16 -04:00 committed by Simon Ser
parent 9d99bb956f
commit 8f7bb145b7
4 changed files with 30 additions and 14 deletions

View file

@ -96,6 +96,7 @@ struct sway_server {
struct wlr_session_lock_manager_v1 *manager;
struct wlr_session_lock_v1 *lock;
struct wlr_surface *focused;
struct wl_listener lock_new_surface;
struct wl_listener lock_unlock;
struct wl_listener lock_destroy;