kdrive: don't post motion event if there was no motion. #16179
Based on the patch by Tomas Janousek. X.Org Bug 16179 <http://bugs.freedesktop.org/show_bug.cgi?id=16179>
This commit is contained in:
parent
ac1db45449
commit
26e7e69ab8
|
@ -2074,7 +2074,7 @@ KdEnqueuePointerEvent(KdPointerInfo *pi, unsigned long flags, int rx, int ry,
|
||||||
int (*matrix)[3] = kdPointerMatrix.matrix;
|
int (*matrix)[3] = kdPointerMatrix.matrix;
|
||||||
unsigned long button;
|
unsigned long button;
|
||||||
int n;
|
int n;
|
||||||
int dixflags;
|
int dixflags = 0;
|
||||||
|
|
||||||
if (!pi)
|
if (!pi)
|
||||||
return;
|
return;
|
||||||
|
@ -2105,11 +2105,15 @@ KdEnqueuePointerEvent(KdPointerInfo *pi, unsigned long flags, int rx, int ry,
|
||||||
z = rz;
|
z = rz;
|
||||||
|
|
||||||
if (flags & KD_MOUSE_DELTA)
|
if (flags & KD_MOUSE_DELTA)
|
||||||
dixflags = POINTER_RELATIVE & POINTER_ACCELERATE;
|
{
|
||||||
else
|
if (x || y || z)
|
||||||
dixflags = POINTER_ABSOLUTE;
|
dixflags = POINTER_RELATIVE & POINTER_ACCELERATE;
|
||||||
|
} else if (x != pi->dixdev->last.valuators[0] ||
|
||||||
|
y != pi->dixdev->last.valuators[1])
|
||||||
|
dixflags = POINTER_ABSOLUTE;
|
||||||
|
|
||||||
_KdEnqueuePointerEvent(pi, MotionNotify, x, y, z, 0, dixflags, FALSE);
|
if (dixflags)
|
||||||
|
_KdEnqueuePointerEvent(pi, MotionNotify, x, y, z, 0, dixflags, FALSE);
|
||||||
|
|
||||||
buttons = flags;
|
buttons = flags;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user