ca7f815695
- xserver-1.6.0-xtest-pointerscreen.patch: set POINTER_SCREEN flag for core XTestFakeInput events (#490984) - xserver-1.6.0-xinerama-cursors.patch: don't display SW cursors when switching screens. - xserver-1.6.0-xinerama-crashes.patch: don't crash on key repeats in xinerama setups.
74 lines
2.6 KiB
Diff
74 lines
2.6 KiB
Diff
From c3e5af42be915b27056644c2df6a4ce30b4ab5f3 Mon Sep 17 00:00:00 2001
|
|
From: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Date: Wed, 25 Mar 2009 15:51:43 +1000
|
|
Subject: [PATCH] Xext: set POINTER_SCREEN flag in XTestFakeInput if necessary. (RH #490984)
|
|
|
|
The POINTER_SCREEN flag must be set explicitly for XTest core events to avoid
|
|
out-of-range events when the lastSlave was an SD with an explicit axis range.
|
|
Device events sent through XTest don't need this flag, they are expected to be
|
|
in the valuator range of the device anyway.
|
|
|
|
Red Hat Bug 490984 <https://bugzilla.redhat.com/show_bug.cgi?id=490984>
|
|
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
---
|
|
Xext/xtest.c | 14 +++++++++++---
|
|
1 files changed, 11 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/Xext/xtest.c b/Xext/xtest.c
|
|
index a7f3830..3ff02ed 100644
|
|
--- a/Xext/xtest.c
|
|
+++ b/Xext/xtest.c
|
|
@@ -161,6 +161,7 @@ ProcXTestFakeInput(client)
|
|
int nevents;
|
|
int i;
|
|
int base = 0;
|
|
+ int flags = 0;
|
|
|
|
nev = (stuff->length << 2) - sizeof(xReq);
|
|
if ((nev % sizeof(xEvent)) || !nev)
|
|
@@ -211,8 +212,14 @@ ProcXTestFakeInput(client)
|
|
client->errorValue = ev->u.u.type;
|
|
return BadValue;
|
|
}
|
|
+
|
|
+ if (ev->u.u.detail == xFalse)
|
|
+ flags |= POINTER_ABSOLUTE;
|
|
} else
|
|
+ {
|
|
firstValuator = 0;
|
|
+ flags |= POINTER_ABSOLUTE;
|
|
+ }
|
|
|
|
if (nev == 1 && type == XI_DeviceMotionNotify && !dev->valuator)
|
|
{
|
|
@@ -281,6 +288,8 @@ ProcXTestFakeInput(client)
|
|
valuators[1] = ev->u.keyButtonPointer.rootY;
|
|
numValuators = 2;
|
|
firstValuator = 0;
|
|
+ if (ev->u.u.detail == xFalse)
|
|
+ flags = POINTER_ABSOLUTE | POINTER_SCREEN;
|
|
break;
|
|
default:
|
|
client->errorValue = ev->u.u.type;
|
|
@@ -378,14 +387,13 @@ ProcXTestFakeInput(client)
|
|
GetEventList(&events);
|
|
switch(type) {
|
|
case MotionNotify:
|
|
- nevents = GetPointerEvents(events, dev, type, 0,
|
|
- (ev->u.u.detail == xFalse) ? POINTER_ABSOLUTE : 0,
|
|
+ nevents = GetPointerEvents(events, dev, type, 0, flags,
|
|
firstValuator, numValuators, valuators);
|
|
break;
|
|
case ButtonPress:
|
|
case ButtonRelease:
|
|
nevents = GetPointerEvents(events, dev, type, ev->u.u.detail,
|
|
- POINTER_ABSOLUTE, firstValuator,
|
|
+ flags, firstValuator,
|
|
numValuators, valuators);
|
|
break;
|
|
case KeyPress:
|
|
--
|
|
1.6.0.6
|
|
|