[client] wm/wayland: correctly handle double keyboard grab
When input:grabKeyboardOnFocus is set (default), entering capture mode grabs the keyboard a second time. This commit makes the second grab a no-op on Wayland to avoid a crash.
This commit is contained in:
1 parent
c650690bcc
commit
50c934db5a
1 file changed
+1
-1
+1
-1
@@ -460,7 +460,7 @@ static void wmWaylandGrabKeyboard()
|
||||
{
|
||||
struct WMDataWayland * wm = g_wmState.opaque;
|
||||
|
||||
if (wm->keyboardInhibitManager)
|
||||
if (wm->keyboardInhibitManager && !wm->keyboardInhibitor)
|
||||
{
|
||||
wm->keyboardInhibitor = zwp_keyboard_shortcuts_inhibit_manager_v1_inhibit_shortcuts(
|
||||
wm->keyboardInhibitManager, wm->surface, wm->seat);
|
||||
|
||||
Reference in new issue
Block a user