#include <X11/Xlib.h>
#include <X11/Xproto.h>
#include <X11/Xutil.h>
-#include <X11/XKBlib.h>
#ifdef XINERAMA
#include <X11/extensions/Xinerama.h>
#endif /* XINERAMA */
[UnmapNotify] = unmapnotify
};
static Atom wmatom[WMLast], netatom[NetLast];
-static Bool running = True, usexkb;
+static Bool running = True;
static Cursor cursor[CurLast];
static Display *dpy;
static DC dc;
XKeyEvent *ev;
ev = &e->xkey;
- if(usexkb)
- keysym = XkbKeycodeToKeysym(dpy, (KeyCode)ev->keycode, 0, 0);
- else
- keysym = XKeycodeToKeysym(dpy, (KeyCode)ev->keycode, 0);
+ keysym = XKeycodeToKeysym(dpy, (KeyCode)ev->keycode, 0);
for(i = 0; i < LENGTH(keys); i++)
if(keysym == keys[i].keysym
&& CLEANMASK(keys[i].mod) == CLEANMASK(ev->state)
void
setup(void) {
XSetWindowAttributes wa;
- int dummy = 0, xkbmajor = XkbMajorVersion, xkbminor = XkbMinorVersion;
/* clean up any zombies immediately */
sigchld(0);
|EnterWindowMask|LeaveWindowMask|StructureNotifyMask|PropertyChangeMask;
XChangeWindowAttributes(dpy, root, CWEventMask|CWCursor, &wa);
XSelectInput(dpy, root, wa.event_mask);
- /* init xkb */
- usexkb = XkbQueryExtension(dpy, &dummy, &dummy, &dummy, &xkbmajor, &xkbminor);
grabkeys();
}