[prev in list] [next in list] [prev in thread] [next in thread]
List: freedesktop-xorg-devel
Subject: [PATCH libXtst] Allow more than 6 axes to be sent.
From: Rami Ylimäki <rami.ylimaki () vincit ! fi>
Date: 2010-09-29 15:03:30
Message-ID: 1285772610-8207-1-git-send-email-rami.ylimaki () vincit ! fi
[Download RAW message or body]
From: Tobias Koch <tobias.koch@nokia.com>
From: Tobias Koch <tobias.koch@nokia.com>
If the number of axes exceeds 6, X server will return BadValue for
XTestFakeInput because the number of axes in a single DeviceValuator
event is incorrectly set to the total number of axes.
Signed-off-by: Tobias Koch <tobias.koch@nokia.com>
Reviewed-by: Rami Ylimäki <rami.ylimaki@vincit.fi>
---
src/XTest.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/XTest.c b/src/XTest.c
index c04cc09..24ae8b9 100644
--- a/src/XTest.c
+++ b/src/XTest.c
@@ -267,12 +267,10 @@ send_axes(
req->length += ((n_axes + 5) / 6) * (SIZEOF(xEvent) >> 2);
ev.type = XI_DeviceValuator + (long)info->data;
ev.deviceid = dev->device_id;
- ev.num_valuators = n_axes;
ev.first_valuator = first_axis;
while (n_axes > 0) {
- n = n_axes;
- if (n > 6)
- n = 6;
+ n = n_axes > 6 ? 6 : n_axes;
+ ev.num_valuators = n;
switch (n) {
case 6:
ev.valuator5 = *(axes+5);
--
1.6.3.3
_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic