[PATCH 4/5] dix: add extra check for valid valuator mask in emulate_scroll_events
Peter Hutterer
peter.hutterer at who-t.net
Thu Sep 8 21:19:28 PDT 2011
Not really necessary since the caller skips loop iterations where it isn't
set but let't not rely on that.
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
dix/getevents.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/dix/getevents.c b/dix/getevents.c
index 4f0ad9f..fd7b31f 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -1205,6 +1205,9 @@ emulate_scroll_button_events(InternalEvent *events,
if (dev->valuator->axes[axis].scroll.type == SCROLL_TYPE_NONE)
return 0;
+ if (!valuator_mask_isset(mask, axis))
+ return 0;
+
ax = &dev->valuator->axes[axis];
incr = ax->scroll.increment;
--
1.7.6
More information about the xorg-devel
mailing list