From ec921d7f39fbf64a917b1053156dc143140ab269 Mon Sep 17 00:00:00 2001 From: Quantum Date: Sun, 31 Jan 2021 21:39:44 -0500 Subject: [PATCH] [client] spice: correctly ungrab keyboard when grabKeyboardOnFocus=no When input:grabKeyboardOnFocus=no, exiting capture mode should ungrab the keyboard. Otherwise, focusing the window doesn't grab the keyboard, but toggling capture mode would leave the keyboard stuck in a grabbed state until defocused. --- client/src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/main.c b/client/src/main.c index 542156d9..f05e9297 100644 --- a/client/src/main.c +++ b/client/src/main.c @@ -1563,7 +1563,7 @@ static void setGrabQuiet(bool enable) { if (params.grabKeyboard) { - if (!g_state.focused || params.captureInputOnly) + if (!params.grabKeyboardOnFocus || !g_state.focused || params.captureInputOnly) g_state.ds->ungrabKeyboard(); }