diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2009-03-25 13:08:27 +1000 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2009-05-08 12:39:55 -0700 |
commit | 4b702526dec35f5cfe5c6baec6a77c02c95c2867 (patch) | |
tree | ab821d2b300ddd75adae297722f66b287fd547d7 /dix | |
parent | fdbb6fd3d3c0ce7078f8faaf089af51cc36cbcb3 (diff) |
dix: ignore non-pointer events in XineramaCheckMotion (#20557)
Note that deviceKeyButtonPointer and keyButtonPointer have the same wire
layout, so we only need to check for event types.
X.Org Bug 20557 <http://bugs.freedesktop.org/show_bug.cgi?id=20557>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'dix')
-rw-r--r-- | dix/events.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/dix/events.c b/dix/events.c index 6743caed9..63b067435 100644 --- a/dix/events.c +++ b/dix/events.c @@ -625,6 +625,23 @@ XineramaCheckMotion(xEvent *xE, DeviceIntPtr pDev) if (xE && !syncEvents.playingEvents) { + /* GetPointerEvents() guarantees that pointer events have the correct + rootX/Y set already. */ + switch(xE->u.u.type) + { + case ButtonPress: + case ButtonRelease: + case MotionNotify: + break; + default: + if (xE->u.u.type == DeviceButtonPress || + xE->u.u.type == DeviceButtonRelease || + xE->u.u.type == DeviceMotionNotify) + break; + /* all other events return FALSE */ + return FALSE; + } + /* Motion events entering DIX get translated to Screen 0 coordinates. Replayed events have already been translated since they've entered DIX before */ |