summaryrefslogtreecommitdiff
path: root/mi
diff options
context:
space:
mode:
authorPeter Hutterer <peter@cs.unisa.edu.au>2008-04-29 14:53:41 +0930
committerPeter Hutterer <peter@cs.unisa.edu.au>2008-04-29 14:53:41 +0930
commitff36753755360aaa16ab8604a0ab78123884b57d (patch)
tree17de6bd79087bf1a77c87fd0fd999b04af61286a /mi
parentec2fca7e6f7ce8fdf33d959b7adeaae935ec4b37 (diff)
mi: call the custom event handlers for both MD and SD.
Diffstat (limited to 'mi')
-rw-r--r--mi/mieq.c37
1 files changed, 21 insertions, 16 deletions
diff --git a/mi/mieq.c b/mi/mieq.c
index 082ebab91..9f818677b 100644
--- a/mi/mieq.c
+++ b/mi/mieq.c
@@ -313,16 +313,7 @@ mieqProcessInputEvents(void)
NewCurrentScreen (e->pDev, DequeueScreen(e->pDev), x, y);
}
else {
- /* If someone's registered a custom event handler, let them
- * steal it. */
- if (miEventQueue.handlers[e->events->event->u.u.type]) {
- miEventQueue.handlers[e->events->event->u.u.type](
- DequeueScreen(e->pDev)->myNum,
- e->events->event,
- e->pDev,
- e->nevents);
- return;
- }
+ mieqHandler handler;
/* FIXME: Bad hack. The only event where we actually get multiple
* events at once is a DeviceMotionNotify followed by
@@ -350,13 +341,27 @@ mieqProcessInputEvents(void)
} else
master_event = NULL;
- /* process slave first, then master */
- e->pDev->public.processInputProc(event, e->pDev, e->nevents);
-
- if (!e->pDev->isMaster && e->pDev->u.master)
+ /* If someone's registered a custom event handler, let them
+ * steal it. */
+ if ((handler = miEventQueue.handlers[e->events->event->u.u.type]))
{
- e->pDev->u.master->public.processInputProc(master_event,
- e->pDev->u.master, e->nevents);
+ handler(DequeueScreen(e->pDev)->myNum, e->events->event,
+ e->pDev, e->nevents);
+ if (!e->pDev->isMaster && e->pDev->u.master)
+ {
+ handler(DequeueScreen(e->pDev->u.master)->myNum,
+ e->events->event, e->pDev->u.master, e->nevents);
+ }
+ } else
+ {
+ /* process slave first, then master */
+ e->pDev->public.processInputProc(event, e->pDev, e->nevents);
+
+ if (!e->pDev->isMaster && e->pDev->u.master)
+ {
+ e->pDev->u.master->public.processInputProc(master_event,
+ e->pDev->u.master, e->nevents);
+ }
}
if (e->nevents > 1)