diff --git a/src/backend/wayland/wl_session_lock.c b/src/backend/wayland/wl_session_lock.c index 6fec975..f82ced3 100644 --- a/src/backend/wayland/wl_session_lock.c +++ b/src/backend/wayland/wl_session_lock.c @@ -5,6 +5,7 @@ #include #include #include +#include #include "wl_types.h" static void handle_lock_new_surface(struct wl_listener *listener, void *data) @@ -23,6 +24,11 @@ static void handle_lock_new_surface(struct wl_listener *listener, void *data) struct wlr_scene_tree *parent = wl_state.level_trees[WL_LAYER_OVERLAY] ? wl_state.level_trees[WL_LAYER_OVERLAY] : &wl_state.scene->tree; wlr_scene_subsurface_tree_create(parent, lock_surface->surface); + + /* Give keyboard focus to the lock surface */ + if (wl_state.seat) + wlr_seat_keyboard_notify_enter(wl_state.seat, lock_surface->surface, + NULL, 0, NULL); } static void handle_lock_unlock(struct wl_listener *listener, void *data)