[PATCH] dix: a valuator count of 0 is valid (#34510)
Peter Hutterer
peter.hutterer at who-t.net
Sun Feb 20 21:39:17 PST 2011
For all but motion and proximity events, having no valuators is ok.
Regression from 1.9, keyboard events are not converted to protocol events.
X.Org Bug 34510 <http://bugs.freedesktop.org/show_bug.cgi?id=34510>
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
dix/eventconvert.c | 16 ++++++++++++++--
1 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/dix/eventconvert.c b/dix/eventconvert.c
index 7b894f0..dd1ca46 100644
--- a/dix/eventconvert.c
+++ b/dix/eventconvert.c
@@ -263,8 +263,20 @@ eventToKeyButtonPointer(DeviceEvent *ev, xEvent **xi, int *count)
num_events = (countValuators(ev, &first) + 5)/6; /* valuator ev */
if (num_events <= 0)
{
- *count = 0;
- return BadMatch;
+ switch (ev->type)
+ {
+ case ET_KeyPress:
+ case ET_KeyRelease:
+ case ET_ButtonPress:
+ case ET_ButtonRelease:
+ /* no axes is ok */
+ break;
+ case ET_Motion:
+ case ET_ProximityIn:
+ case ET_ProximityOut:
+ *count = 0;
+ return BadMatch;
+ }
}
num_events++; /* the actual event event */
--
1.7.4
More information about the xorg-devel
mailing list