summaryrefslogtreecommitdiffstats
path: root/src/x11util.cpp
diff options
context:
space:
mode:
authorSimon Rettberg2019-04-18 15:55:48 +0200
committerSimon Rettberg2019-04-18 15:55:48 +0200
commitdd3ee3821fb6ebab9d1b0858e357ad110822d7e1 (patch)
treec658ab6fcad69fbfcd5b79363a2557df06ddf728 /src/x11util.cpp
parentFix: mini-icon might get cropped if > 95px (diff)
downloadslxgreeter-dd3ee3821fb6ebab9d1b0858e357ad110822d7e1.tar.gz
slxgreeter-dd3ee3821fb6ebab9d1b0858e357ad110822d7e1.tar.xz
slxgreeter-dd3ee3821fb6ebab9d1b0858e357ad110822d7e1.zip
Add caps lock warning
Diffstat (limited to 'src/x11util.cpp')
-rw-r--r--src/x11util.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/x11util.cpp b/src/x11util.cpp
index 67dae90..c401b4f 100644
--- a/src/x11util.cpp
+++ b/src/x11util.cpp
@@ -2,6 +2,7 @@
extern "C" {
#include <X11/Xlib.h>
#include <X11/Xutil.h>
+ #include <X11/XKBlib.h>
}
#include <cstring>
#include <cstdlib>
@@ -62,3 +63,11 @@ cleanup:
XCloseDisplay(dpy);
}
}
+
+extern "C"
+unsigned int getKeyMask(Display *dpy)
+{
+ unsigned int n = 0;
+ XkbGetIndicatorState(dpy, XkbUseCoreKbd, &n);
+ return n;
+}