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;
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;
}
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);