mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-05-09 04:58:06 +02:00
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>
(cherry picked from commit 26e7e69ab8)
This commit is contained in:
parent
45f274415d
commit
a08ea64ded
1 changed files with 9 additions and 5 deletions
|
|
@ -2078,7 +2078,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;
|
||||||
|
|
@ -2109,11 +2109,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…
Add table
Reference in a new issue