[client] spice: avoid spice_key_modifiers when input is disabled

This commit is contained in:
Quantum 2021-08-15 18:11:36 -04:00 committed by Geoffrey McRae
parent 14ad83c6b8
commit 8a5efef622

View File

@ -414,6 +414,9 @@ void app_handleKeyboardModifiers(bool ctrl, bool shift, bool alt, bool super)
void app_handleKeyboardLEDs(bool numLock, bool capsLock, bool scrollLock) void app_handleKeyboardLEDs(bool numLock, bool capsLock, bool scrollLock)
{ {
if (!core_inputEnabled())
return;
uint32_t modifiers = uint32_t modifiers =
(scrollLock ? 1 /* SPICE_SCROLL_LOCK_MODIFIER */ : 0) | (scrollLock ? 1 /* SPICE_SCROLL_LOCK_MODIFIER */ : 0) |
(numLock ? 2 /* SPICE_NUM_LOCK_MODIFIER */ : 0) | (numLock ? 2 /* SPICE_NUM_LOCK_MODIFIER */ : 0) |