Merge pull request #3326

4f10683 OSHelper: Linux - fix isCapsLock memory leak (xiphon)
This commit is contained in:
luigi1111 2021-03-05 13:58:00 -05:00
commit 059af2bb49
No known key found for this signature in database
GPG Key ID: F4ACA0183641E010

View File

@ -223,6 +223,7 @@ bool OSHelper::isCapsLock() const
unsigned n; unsigned n;
XkbGetIndicatorState(d, XkbUseCoreKbd, &n); XkbGetIndicatorState(d, XkbUseCoreKbd, &n);
caps_state = (n & 0x01) == 1; caps_state = (n & 0x01) == 1;
XCloseDisplay(d);
} }
return caps_state; return caps_state;
#elif defined(Q_OS_MAC) #elif defined(Q_OS_MAC)