X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fevent.c;h=aca69cc36aab7380ea9dcee15611f6e63e8c12d3;hb=ec328fc04fe6e8d8c3d1ee386d4964963eb2ee17;hp=142cf1f2fd1b44f45966f3a595f55f500480d2eb;hpb=dc2e6f6bf7143a56de360a393b33906735e63625;p=chaz%2Fopenbox diff --git a/openbox/event.c b/openbox/event.c index 142cf1f2..aca69cc3 100644 --- a/openbox/event.c +++ b/openbox/event.c @@ -33,6 +33,7 @@ #include "menuframe.h" #include "keyboard.h" #include "mouse.h" +#include "hooks.h" #include "focus.h" #include "focus_cycle.h" #include "moveresize.h" @@ -656,8 +657,10 @@ static void event_process(const XEvent *ec, gpointer data) /* keyboard layout changes for modifier mapping changes. reload the modifier map, and rebind all the key bindings as appropriate */ ob_debug("Kepboard map changed. Reloading keyboard bindings."); + ob_set_state(OB_STATE_RECONFIGURING); obt_keyboard_reload(); keyboard_rebind(); + ob_set_state(OB_STATE_RUNNING); } else if (e->type == ClientMessage) { /* This is for _NET_WM_REQUEST_FRAME_EXTENTS messages. They come for @@ -738,6 +741,11 @@ static void event_process(const XEvent *ec, gpointer data) e->type == MotionNotify) event_handle_user_input(client, e); + XFlush(obt_display); + + /* run all the hooks at once */ + hooks_run_queue(); + /* if something happens and it's not from an XEvent, then we don't know the time */ event_curtime = CurrentTime; @@ -1117,7 +1125,6 @@ static void event_handle_client(ObClient *client, XEvent *e) move = TRUE; } - if (e->xconfigurerequest.value_mask & CWStackMode) { ObClient *sibling = NULL; gulong ignore_start; @@ -1721,7 +1728,8 @@ static gboolean event_handle_menu_input(XEvent *ev) else if (keycode == ob_keycode(OB_KEY_LEFT)) { /* Left goes to the parent menu */ - menu_frame_select(frame, NULL, TRUE); + if (frame->parent) + menu_frame_select(frame, NULL, TRUE); ret = TRUE; }