summaryrefslogtreecommitdiff
path: root/openbox/event.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-03-17 01:47:20 +0000
committerDana Jansens <danakj@orodu.net>2003-03-17 01:47:20 +0000
commit432ac0983e058133e03885171f266dc4ba07f488 (patch)
tree960e5f90cc78632b24712c0f0be7b18dc402d331 /openbox/event.c
parent9a3459e983a11d74ec9f5dc415ce0af551c4b74e (diff)
give engines mouse event notifications. make the openbox engine display pressed buttons
Diffstat (limited to 'openbox/event.c')
-rw-r--r--openbox/event.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/openbox/event.c b/openbox/event.c
index 00b2857c..f6a198cc 100644
--- a/openbox/event.c
+++ b/openbox/event.c
@@ -12,6 +12,7 @@
#include "hooks.h"
#include "extensions.h"
#include "timer.h"
+#include "engine.h"
#include <X11/Xlib.h>
#include <X11/keysym.h>
@@ -286,13 +287,25 @@ void event_process(XEvent *e)
/* dispatch Crossing, Pointer and Key events to the hooks */
switch(e->type) {
case EnterNotify:
+ if (client != NULL) engine_mouse_enter(client->frame, window);
HOOKFIRECLIENT(pointerenter, client);
break;
case LeaveNotify:
+ if (client != NULL) engine_mouse_leave(client->frame, window);
HOOKFIRECLIENT(pointerleave, client);
break;
case ButtonPress:
+ if (client != NULL)
+ engine_mouse_press(client->frame, window,
+ e->xbutton.x, e->xbutton.y);
+ pointer_event(e, client);
+ break;
case ButtonRelease:
+ if (client != NULL)
+ engine_mouse_release(client->frame, window,
+ e->xbutton.x, e->xbutton.y);
+ pointer_event(e, client);
+ break;
case MotionNotify:
pointer_event(e, client);
break;