Fix keyboard layouts

Commit 08ca70c00d added support for Xlib cursor themes by making awesome use
Xlib for its X11 connection and for setting cursor icons. Everything else was
still done through xcb.

However, an unexpected side effect of this is that Xlib enabled the XKB
extension without asking us. This changes the way that keyboard events are
reported which causes problems with various keyboard events.

(Normally, Xlib hides these things by silently fixing up the events that it
hands out to applications. However, since we bypassed Xlib via xcb...)

The fix is simple: Luckily Xlib provides a function for disabling its XKB
support which is just what we need.

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2013-02-01 23:06:08 +01:00
parent 5024843e95
commit 03759b4847
1 changed files with 4 additions and 0 deletions

View File

@ -34,6 +34,7 @@
#include <xcb/shape.h>
#include <X11/Xlib-xcb.h>
#include <X11/XKBlib.h>
#include <glib-unix.h>
@ -369,6 +370,9 @@ main(int argc, char **argv)
sigemptyset(&sa.sa_mask);
sigaction(SIGSEGV, &sa, 0);
/* XLib sucks */
XkbIgnoreExtension(True);
/* X stuff */
globalconf.display = XOpenDisplay(NULL);
if (globalconf.display == NULL) {