diff options
author | Simon Rettberg | 2019-04-18 15:55:48 +0200 |
---|---|---|
committer | Simon Rettberg | 2019-04-18 15:55:48 +0200 |
commit | dd3ee3821fb6ebab9d1b0858e357ad110822d7e1 (patch) | |
tree | c658ab6fcad69fbfcd5b79363a2557df06ddf728 /src/x11util.cpp | |
parent | Fix: mini-icon might get cropped if > 95px (diff) | |
download | slxgreeter-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.cpp | 9 |
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; +} |