[hackers] [dwm] reverting the xkb dependency, I don't care if this function is deprecated, it seems it breaks other stuff instead. || anselm
changeset: 1613:82c9ae7c1c4b
tag: tip
user: anselm_AT_garbe.us
date: Sun Nov 18 16:39:56 2012 +0100
files: dwm.c
description:
reverting the xkb dependency, I don't care if this function is deprecated, it seems it breaks other stuff instead.
diff -r 565cb8c28fc0 -r 82c9ae7c1c4b dwm.c
--- a/dwm.c Sun Nov 18 12:04:29 2012 +0100
+++ b/dwm.c Sun Nov 18 16:39:56 2012 +0100
_AT_@ -36,7 +36,6 @@
#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 */
_AT_@ -281,7 +280,7 @@
[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;
_AT_@ -1093,10 +1092,7 @@
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)
_AT_@ -1606,7 +1602,6 @@
void
setup(void) {
XSetWindowAttributes wa;
- int dummy = 0, xkbmajor = XkbMajorVersion, xkbminor = XkbMinorVersion;
/* clean up any zombies immediately */
sigchld(0);
_AT_@ -1661,8 +1656,6 @@
|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();
}
Received on Sun Nov 18 2012 - 16:39:47 CET
This archive was generated by hypermail 2.3.0
: Sun Nov 18 2012 - 16:48:05 CET