Track keyboard grab state internally rather than using SDL

Versions of sdl2-compat prior to 2.32.64 (and native SDL3) won't
set the grab flag if grabbing the keyboard fails, even though the
compositor still may be exclusively passing system keys to us via
some external configuration by the user. This causes the super key
to not be sent to the host, because we think the client OS will
consume it and don't want to duplicate the input.

Fixes #1900
This commit is contained in:
Cameron Gutman
2026-06-06 16:11:37 -05:00
parent 19d77704ba
commit 534ce02756
2 changed files with 15 additions and 14 deletions
+2 -1
View File
@@ -218,7 +218,8 @@ private:
int m_GamepadMask;
GamepadState m_GamepadState[MAX_GAMEPADS];
QSet<short> m_KeysDown;
bool m_FakeCaptureActive;
bool m_FakeMouseCaptureActive;
bool m_KeyboardCaptureActive;
QString m_OldIgnoreDevices;
QString m_OldIgnoreDevicesExcept;
QStringList m_IgnoreDeviceGuids;