X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=obt%2Fmainloop.c;h=ebc9e96a8260a4a0be3f49fb033d29da3ab5b2be;hb=98c86118ca941d71c0c511c865d5913814012aed;hp=64972dd708eb17aecec0fae7fa9190d6c1be12aa;hpb=b01dd0b20fedb27681ceda53deb8c7f2f83eabc3;p=chaz%2Fopenbox diff --git a/obt/mainloop.c b/obt/mainloop.c index 64972dd7..ebc9e96a 100644 --- a/obt/mainloop.c +++ b/obt/mainloop.c @@ -21,10 +21,21 @@ #include "obt/display.h" #include "obt/util.h" +#ifdef HAVE_STDIO_H #include +#endif +#ifdef HAVE_STDLIB_H #include +#endif +#ifdef HAVE_SYS_SELECT_H #include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_SIGNAL_H #include +#endif typedef struct _ObtMainLoopTimer ObtMainLoopTimer; typedef struct _ObtMainLoopSignal ObtMainLoopSignal; @@ -140,7 +151,7 @@ struct _ObtMainLoopFdHandlerType GDestroyNotify destroy; }; -ObtMainLoop *obt_main_loop_new() +ObtMainLoop *obt_main_loop_new(void) { ObtMainLoop *loop; @@ -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);