Update the cursor position using GetSpritePosition().
The module needs to correctly track the mouse position by querying the
current X cursor position in InputDevice::getPointerPos().
Fixes: https://sourceforge.net/p/tigervnc/bug-tracker/152/
diff --git a/unix/xserver/hw/vnc/Input.cc b/unix/xserver/hw/vnc/Input.cc
index 28b84c7..4ecd81e 100644
--- a/unix/xserver/hw/vnc/Input.cc
+++ b/unix/xserver/hw/vnc/Input.cc
@@ -1,5 +1,5 @@
/* Copyright (C) 2009 TightVNC Team
- * Copyright (C) 2009 Red Hat, Inc.
+ * Copyright (C) 2009, 2014 Red Hat, Inc.
* Copyright 2013 Pierre Ossman for Cendio AB
*
* This is free software; you can redistribute it and/or modify
@@ -202,6 +202,14 @@
const rfb::Point &InputDevice::getPointerPos(void)
{
+ if (pointerDev != NULL) {
+ int x, y;
+
+ GetSpritePosition (pointerDev, &x, &y);
+ cursorPos.x = x;
+ cursorPos.y = y;
+ }
+
return cursorPos;
}