X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fevent.c;h=f71fdf57b07e1689b7e588be6da45c4a1127c528;hb=3cbe368018ed5a2198e9e314bdd7338e4864886d;hp=094d19fe2267ce4b0045b3c9ee06f0bcd5119f02;hpb=ec9dd7fdd7531d2ca951a0b812bf8e63b6e9a377;p=chaz%2Fopenbox diff --git a/openbox/event.c b/openbox/event.c index 094d19fe..f71fdf57 100644 --- a/openbox/event.c +++ b/openbox/event.c @@ -17,7 +17,6 @@ #include "stacking.h" #include "extensions.h" #include "timer.h" -#include "dispatch.h" #include "event.h" #include @@ -523,45 +522,29 @@ static void event_process(XEvent *e) xerror_set_ignore(FALSE); } - if (menu_frame_visible) - if (e->type == MotionNotify || e->type == ButtonRelease || - e->type == ButtonPress || - e->type == KeyPress || e->type == KeyRelease) { - event_handle_menu(e); - - return; /* no dispatch! */ - } - - if (moveresize_in_progress) - if (e->type == MotionNotify || e->type == ButtonRelease || - e->type == ButtonPress || - e->type == KeyPress || e->type == KeyRelease) { - moveresize_event(e); - - return; /* no dispatch! */ - } - /* user input (action-bound) events */ if (e->type == ButtonPress || e->type == ButtonRelease || e->type == MotionNotify || e->type == KeyPress || e->type == KeyRelease) { - ObFrameContext context; - - context = frame_context(client, e->xany.window); + if (menu_frame_visible) + event_handle_menu(e); + else if (moveresize_in_progress) + moveresize_event(e); + else { + ObFrameContext context; - if (!keyboard_process_interactive_grab(e, &client, &context)) { + context = frame_context(client, e->xany.window); - if (e->type == ButtonPress || e->type == ButtonRelease || - e->type == MotionNotify) - mouse_event(client, context, e); - else if (e->type == KeyPress) - keyboard_event(client, e); + if (!keyboard_process_interactive_grab(e, &client, &context)) { + if (e->type == ButtonPress || e->type == ButtonRelease || + e->type == MotionNotify) + mouse_event(client, context, e); + else if (e->type == KeyPress) + keyboard_event(client, e); + } } } - - /* dispatch the event to registered handlers */ - dispatch_x(e, client); } static void event_handle_root(XEvent *e)