diff --git a/src/platform/capslock_x11.cpp b/src/platform/capslock_x11.cpp index 141ddb429..62b455bf1 100644 --- a/src/platform/capslock_x11.cpp +++ b/src/platform/capslock_x11.cpp @@ -35,6 +35,7 @@ bool Platform::capsLockEnabled() unsigned n; XkbGetIndicatorState(d, XkbUseCoreKbd, &n); caps_state = (n & 0x01) == 1; + XCloseDisplay(d); } return caps_state; }