reverting the xkb dependency, I don't care if this function is deprecated, it seems it breaks other stuff instead.

This commit is contained in:
anselm@garbe.us 2012-11-18 16:39:56 +01:00
parent d456617f0e
commit 3aabc08ede

9
dwm.c
View file

@ -36,7 +36,6 @@
#include <X11/Xlib.h> #include <X11/Xlib.h>
#include <X11/Xproto.h> #include <X11/Xproto.h>
#include <X11/Xutil.h> #include <X11/Xutil.h>
#include <X11/XKBlib.h>
#ifdef XINERAMA #ifdef XINERAMA
#include <X11/extensions/Xinerama.h> #include <X11/extensions/Xinerama.h>
#endif /* XINERAMA */ #endif /* XINERAMA */
@ -281,7 +280,7 @@ static void (*handler[LASTEvent]) (XEvent *) = {
[UnmapNotify] = unmapnotify [UnmapNotify] = unmapnotify
}; };
static Atom wmatom[WMLast], netatom[NetLast]; static Atom wmatom[WMLast], netatom[NetLast];
static Bool running = True, usexkb; static Bool running = True;
static Cursor cursor[CurLast]; static Cursor cursor[CurLast];
static Display *dpy; static Display *dpy;
static DC dc; static DC dc;
@ -1093,9 +1092,6 @@ keypress(XEvent *e) {
XKeyEvent *ev; XKeyEvent *ev;
ev = &e->xkey; 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++) for(i = 0; i < LENGTH(keys); i++)
if(keysym == keys[i].keysym if(keysym == keys[i].keysym
@ -1606,7 +1602,6 @@ setmfact(const Arg *arg) {
void void
setup(void) { setup(void) {
XSetWindowAttributes wa; XSetWindowAttributes wa;
int dummy = 0, xkbmajor = XkbMajorVersion, xkbminor = XkbMinorVersion;
/* clean up any zombies immediately */ /* clean up any zombies immediately */
sigchld(0); sigchld(0);
@ -1661,8 +1656,6 @@ setup(void) {
|EnterWindowMask|LeaveWindowMask|StructureNotifyMask|PropertyChangeMask; |EnterWindowMask|LeaveWindowMask|StructureNotifyMask|PropertyChangeMask;
XChangeWindowAttributes(dpy, root, CWEventMask|CWCursor, &wa); XChangeWindowAttributes(dpy, root, CWEventMask|CWCursor, &wa);
XSelectInput(dpy, root, wa.event_mask); XSelectInput(dpy, root, wa.event_mask);
/* init xkb */
usexkb = XkbQueryExtension(dpy, &dummy, &dummy, &dummy, &xkbmajor, &xkbminor);
grabkeys(); grabkeys();
} }