From 06f6a96b56ad178c01876a3628cf3913b9597ebf Mon Sep 17 00:00:00 2001 From: Quantum Date: Mon, 1 Feb 2021 03:30:00 -0500 Subject: [PATCH] [client] spice: fix input:grabKeyboardOnFocus It appears that the keyboard should only be grabbed if the client is focused and the cursor is in the view. However, the relevant logic was missing from core_setCursorInView, and the keyboard was never actually grabbed. This commit adds the call to g_state.ds->grabKeyboard(), allowing grabbing to work. --- client/src/core.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/client/src/core.c b/client/src/core.c index 7feea218..f026d163 100644 --- a/client/src/core.c +++ b/client/src/core.c @@ -69,6 +69,9 @@ void core_setCursorInView(bool enable) if (warpSupport && !g_params.captureInputOnly) g_state.ds->grabPointer(); + + if (g_params.grabKeyboardOnFocus) + g_state.ds->grabKeyboard(); } else {