From 7f70173a70eb1563602bd53dbd4150836ea9ef3f Mon Sep 17 00:00:00 2001 From: Furkan Sahin Date: Sun, 19 Oct 2025 01:21:55 -0400 Subject: [PATCH] xdg_shell: revoke keyboard grab when unfocused explicit popup grabs should be dismissed when the user dismisses the popup. https://wayland.app/protocols/xdg-shell#xdg_popup:request:grab fixes issue in which keyboard focus remains with parent container of popup/context menu even after pointer focuses to new container. --- types/xdg_shell/wlr_xdg_popup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/xdg_shell/wlr_xdg_popup.c b/types/xdg_shell/wlr_xdg_popup.c index 0c3b9fe44..891488a7f 100644 --- a/types/xdg_shell/wlr_xdg_popup.c +++ b/types/xdg_shell/wlr_xdg_popup.c @@ -113,7 +113,7 @@ static void xdg_keyboard_grab_enter(struct wlr_seat_keyboard_grab *grab, } static void xdg_keyboard_grab_clear_focus(struct wlr_seat_keyboard_grab *grab) { - // keyboard focus should remain on the popup + wlr_seat_keyboard_end_grab(grab->seat); } static void xdg_keyboard_grab_key(struct wlr_seat_keyboard_grab *grab, uint32_t time,