From c90da6da781932c2d178bfb7e39ec1d5003543b7 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Tue, 12 Aug 2003 07:26:16 +0000 Subject: move the keyboard and mouse plugins into the kernel for mucho sexiness. make workspace changing a grabbed/interactive process like focus cycling is, with the popup and all. this is some hot shit. --- openbox/event.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) (limited to 'openbox/event.c') diff --git a/openbox/event.c b/openbox/event.c index b5e15a3c..97f01fb6 100644 --- a/openbox/event.c +++ b/openbox/event.c @@ -8,6 +8,8 @@ #include "screen.h" #include "frame.h" #include "menu.h" +#include "keyboard.h" +#include "mouse.h" #include "framerender.h" #include "focus.h" #include "moveresize.h" @@ -541,13 +543,23 @@ static void event_process(XEvent *e) } /* user input (action-bound) events */ - /* if (e->type == ButtonPress || e->type == ButtonRelease || - e->type == MotionNotify) - mouse_event(e, client); - else if (e->type == KeyPress || e->type == KeyRelease) - ; - */ + e->type == MotionNotify || e->type == KeyPress || + e->type == KeyRelease) + { + ObFrameContext context; + + context = frame_context(client, e->xany.window); + + 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); -- cgit v1.2.3