[PATCH v2] dix: don't update the slave coordinates from the VCK.
Peter Hutterer
peter.hutterer at who-t.net
Mon Jan 4 22:15:20 PST 2010
On Mon, Jan 04, 2010 at 08:12:22PM -0800, Keith Packard wrote:
> On Tue, 5 Jan 2010 13:46:07 +1000, Peter Hutterer <peter.hutterer at who-t.net> wrote:
>
> > @@ -630,9 +630,12 @@ updateFromMaster(EventListPtr events, DeviceIntPtr dev, int type, int *num_event
> > if (master && master->last.slave != dev)
> > {
> > CreateClassesChangedEvent(events, master, dev, type);
> > - updateSlaveDeviceCoords(master, dev);
> > - master->last.slave = dev;
> > - master->last.numValuators = dev->last.numValuators;
> > + if (IsPointerDevice(master))
> > + {
> > + updateSlaveDeviceCoords(master, dev);
> > + master->last.slave = dev;
> > + master->last.numValuators = dev->last.numValuators;
> > + }
>
> Are you sure you want to leave the last.slave entry unchanged for
> non-pointer devices here? If so, you'll generate a stream of DCCE
> events, right?
yes, you're right, thanks. This one addresses this, moves the last.slave out
of the condition. The numValuators assignment is not needed afaict, in fact
it doesn't seem to be used anywhere anyway.
---
A keyboard event from a device with both valuators and keys will be posted
through the VCK. In this case, do not update the slave device coordinates
from the VCK - they're always 0/0. Leave them as-is, for the next pointer
event will continue where it left.
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
dix/getevents.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/dix/getevents.c b/dix/getevents.c
index 2df32e8..bfde2e9 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -630,9 +630,12 @@ updateFromMaster(EventListPtr events, DeviceIntPtr dev, int type, int *num_event
if (master && master->last.slave != dev)
{
CreateClassesChangedEvent(events, master, dev, type);
- updateSlaveDeviceCoords(master, dev);
+ if (IsPointerDevice(master))
+ {
+ updateSlaveDeviceCoords(master, dev);
+ master->last.numValuators = dev->last.numValuators;
+ }
master->last.slave = dev;
- master->last.numValuators = dev->last.numValuators;
(*num_events)++;
events++;
}
--
1.6.5.2
-------------- next part --------------
More information about the xorg-devel
mailing list