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 22:51:32 +01:00
parent 61d48ab712
commit 56215a6870
1 changed files with 4 additions and 0 deletions

View File

@ -34,6 +34,7 @@
#include <xcb/xtest.h>
#include <X11/Xlib-xcb.h>
#include <X11/XKBlib.h>
#include "awesome.h"
#include "spawn.h"
@ -374,6 +375,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)