[client] spice: fixed grabKeyboardOnFocus regression

This commit is contained in:
Geoffrey McRae 2021-01-08 23:15:48 +11:00
parent 1c016ac0cd
commit ce96c77098

View File

@ -1162,7 +1162,10 @@ static void setGrab(bool enable)
else
{
if (params.grabKeyboard)
XUngrabKeyboard(g_state.wminfo.info.x11.display, CurrentTime);
{
if (!g_state.focused || !params.grabKeyboardOnFocus)
XUngrabKeyboard(g_state.wminfo.info.x11.display, CurrentTime);
}
XUngrabPointer(g_state.wminfo.info.x11.display, CurrentTime);
}