Skip to content

Commit

Permalink
[client] spice: correctly ungrab keyboard when grabKeyboardOnFocus=no
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
quantum5 authored and gnif committed Feb 9, 2021
1 parent 637a762 commit ec921d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down

0 comments on commit ec921d7

Please sign in to comment.