aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorFurkan Sahin <furkan-dev@proton.me>2022-04-29 23:40:16 -0400
committerFurkan Sahin <furkan-dev@proton.me>2022-04-29 23:40:16 -0400
commitfe0d2a73987f5d0619f6e94a885d2b4de7a46078 (patch)
treef2eee1187e0bdfc562130294de8dde1021e84642 /include
parentb2d6df3a13345f9de5bdc76540b003e9470ddd04 (diff)
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.
Diffstat (limited to 'include')
-rw-r--r--include/sway/input/seat.h4
-rw-r--r--include/sway/server.h1
2 files changed, 1 insertions, 4 deletions
diff --git a/include/sway/input/seat.h b/include/sway/input/seat.h
index c2041742..e3a46872 100644
--- a/include/sway/input/seat.h
+++ b/include/sway/input/seat.h
@@ -201,10 +201,6 @@ struct sway_workspace *seat_get_last_known_workspace(struct sway_seat *seat);
struct sway_container *seat_get_focused_container(struct sway_seat *seat);
-// Force focus to a particular surface that is not part of the workspace
-// hierarchy (used for lockscreen)
-void sway_force_focus(struct wlr_surface *surface);
-
/**
* Return the last container to be focused for the seat (or the most recently
* opened if no container has received focused) that is a child of the given
diff --git a/include/sway/server.h b/include/sway/server.h
index 055c067d..6a5a60c8 100644
--- a/include/sway/server.h
+++ b/include/sway/server.h
@@ -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;