mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
fix(capslock_x11): properly release the X display handle
This fixes caps lock detection after a while, and removes the "Maximum number of clients reached" message on stdout.
This commit is contained in:
parent
653e0b5af2
commit
f9190734d7
|
@ -35,6 +35,7 @@ bool Platform::capsLockEnabled()
|
|||
unsigned n;
|
||||
XkbGetIndicatorState(d, XkbUseCoreKbd, &n);
|
||||
caps_state = (n & 0x01) == 1;
|
||||
XCloseDisplay(d);
|
||||
}
|
||||
return caps_state;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user