[client] spice: set inView false if the focus is lost

Failure to do this results in loss of input on X11 as we need to be sure
the cursor is ungrabbed.
This commit is contained in:
Geoffrey McRae 2021-01-20 05:07:55 +11:00
parent ac3333c0d2
commit f883c630f6

View File

@ -148,6 +148,9 @@ void app_handleFocusEvent(bool focused)
g_state.ds->ungrabKeyboard(); g_state.ds->ungrabKeyboard();
} }
if (!focused)
setCursorInView(false);
g_state.focused = focused; g_state.focused = focused;
g_cursor.realign = true; g_cursor.realign = true;
g_state.ds->realignPointer(); g_state.ds->realignPointer();