X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=openbox%2Fevent.c;h=9705fb656deeb82f92a7a975c2d45d3fc38a5e19;hb=c70379fa8f771e499a4d47e84af06d71838b780d;hp=4d1b6abaa90009d88c7925004c9b5f295c3cbb06;hpb=163950b23bf796a39870044417ca54d667b6b470;p=chaz%2Fopenbox diff --git a/openbox/event.c b/openbox/event.c index 4d1b6aba..9705fb65 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" @@ -738,6 +739,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 +1727,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; } @@ -1884,11 +1891,16 @@ static void event_handle_user_input(ObClient *client, XEvent *e) if (!client || !frame_iconify_animating(client->frame)) mouse_event(client, e); } else - keyboard_event((focus_cycle_target ? focus_cycle_target : - (client ? client : focus_client)), e); + keyboard_event(event_target_client(client), e); } } +ObClient* event_target_client(ObClient *client) +{ + return (focus_cycle_target ? focus_cycle_target : + (client ? client : focus_client)); +} + static void focus_delay_dest(gpointer data) { g_free(data);