]> Dogcows Code - chaz/openbox/blobdiff - obt/mainloop.c
have obt refresh the xlib keyboard stuff on mappingnotify events
[chaz/openbox] / obt / mainloop.c
index 691c6875174585e7352bbf7d842e351407de5e8a..ebc9e96a8260a4a0be3f49fb033d29da3ab5b2be 100644 (file)
 #include "obt/display.h"
 #include "obt/util.h"
 
+#ifdef HAVE_STDIO_H
 #include <stdio.h>
+#endif
+#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
+#endif
+#ifdef HAVE_SYS_SELECT_H
 #include <sys/select.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_SIGNAL_H
 #include <signal.h>
+#endif
 
 typedef struct _ObtMainLoopTimer             ObtMainLoopTimer;
 typedef struct _ObtMainLoopSignal            ObtMainLoopSignal;
@@ -289,6 +300,9 @@ void obt_main_loop_run(ObtMainLoop *loop)
             do {
                 XNextEvent(loop->display, &e);
 
+                if (e.type == MappingNotify)
+                    XRefreshKeyboardMapping(&e.xmapping);
+
                 for (it = loop->x_handlers; it; it = g_slist_next(it)) {
                     ObtMainLoopXHandlerType *h = it->data;
                     h->func(&e, h->data);
This page took 0.020889 seconds and 4 git commands to generate.