kdrive: fix dixflags so they're always defined before enqueuing events #17734
If absolute events were posted, dixflags got set conditionally on whether the valuators are different from the last posted set of values. If dixflags are undefined however, the DIX interprets them as relative valuators. Fix this by making sure defining dixflags is always defined. X.Org Bug 17724 <http://bugs.freedesktop.org/show_bug.cgi?id=17734>
This commit is contained in:
parent
d58f2c30c6
commit
18cdd733ad
@ -2105,13 +2105,17 @@ KdEnqueuePointerEvent(KdPointerInfo *pi, unsigned long flags, int rx, int ry,
|
|||||||
if (flags & KD_MOUSE_DELTA)
|
if (flags & KD_MOUSE_DELTA)
|
||||||
{
|
{
|
||||||
if (x || y || z)
|
if (x || y || z)
|
||||||
|
{
|
||||||
dixflags = POINTER_RELATIVE | POINTER_ACCELERATE;
|
dixflags = POINTER_RELATIVE | POINTER_ACCELERATE;
|
||||||
} else if (x != pi->dixdev->last.valuators[0] ||
|
|
||||||
y != pi->dixdev->last.valuators[1])
|
|
||||||
dixflags = POINTER_ABSOLUTE;
|
|
||||||
|
|
||||||
if (dixflags)
|
|
||||||
_KdEnqueuePointerEvent(pi, MotionNotify, x, y, z, 0, dixflags, FALSE);
|
_KdEnqueuePointerEvent(pi, MotionNotify, x, y, z, 0, dixflags, FALSE);
|
||||||
|
}
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
dixflags = POINTER_ABSOLUTE;
|
||||||
|
if (x != pi->dixdev->last.valuators[0] ||
|
||||||
|
y != pi->dixdev->last.valuators[1])
|
||||||
|
_KdEnqueuePointerEvent(pi, MotionNotify, x, y, z, 0, dixflags, FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
buttons = flags;
|
buttons = flags;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user