aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xwin/winwndproc.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw/xwin/winwndproc.c')
-rw-r--r--xorg-server/hw/xwin/winwndproc.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/xorg-server/hw/xwin/winwndproc.c b/xorg-server/hw/xwin/winwndproc.c
index 278611caf..bd93fbbd3 100644
--- a/xorg-server/hw/xwin/winwndproc.c
+++ b/xorg-server/hw/xwin/winwndproc.c
@@ -925,6 +925,7 @@ winWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
case WIN_POLLING_MOUSE_TIMER_ID:
{
+ static POINT last_point;
POINT point;
WPARAM wL, wM, wR, wShift, wCtrl;
LPARAM lPos;
@@ -936,8 +937,12 @@ winWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
point.x -= GetSystemMetrics(SM_XVIRTUALSCREEN);
point.y -= GetSystemMetrics(SM_YVIRTUALSCREEN);
- /* Deliver absolute cursor position to X Server */
- winEnqueueMotion(point.x, point.y);
+ /* If the mouse pointer has moved, deliver absolute cursor position to X Server */
+ if (last_point.x != point.x || last_point.y != point.y) {
+ winEnqueueMotion(point.x, point.y);
+ last_point.x = point.x;
+ last_point.y = point.y;
+ }
/* Check if a button was released but we didn't see it */
GetCursorPos(&point);