[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.
This commit is contained in:
Quantum 2021-02-01 03:30:00 -05:00 committed by Geoffrey McRae
parent 89b73512ad
commit 06f6a96b56

View File

@ -69,6 +69,9 @@ void core_setCursorInView(bool enable)
if (warpSupport && !g_params.captureInputOnly) if (warpSupport && !g_params.captureInputOnly)
g_state.ds->grabPointer(); g_state.ds->grabPointer();
if (g_params.grabKeyboardOnFocus)
g_state.ds->grabKeyboard();
} }
else else
{ {