]> Dogcows Code - chaz/openbox/blobdiff - openbox/event.c
Merge branch 'backport' into work
[chaz/openbox] / openbox / event.c
index 142cf1f2fd1b44f45966f3a595f55f500480d2eb..a0ce223a231eaa5a14b4170e54d2c27f948f2ef7 100644 (file)
@@ -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;
@@ -1721,7 +1729,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;
             }
 
This page took 0.020227 seconds and 4 git commands to generate.