diff options
author | Tim Waugh <twaugh@redhat.com> | 2014-07-14 17:04:56 +0100 |
---|---|---|
committer | Tim Waugh <twaugh@redhat.com> | 2014-07-14 17:04:56 +0100 |
commit | 2770cfbf86141e4c4edaae0ab4228991b5e66bfb (patch) | |
tree | e6328397d0431055f2899925c00a0339f4c6ffa3 /unix/xserver | |
parent | 51f9a3aafc2008c23cdcbcabf7f271df05d83375 (diff) | |
download | tigervnc-2770cfbf86141e4c4edaae0ab4228991b5e66bfb.tar.gz tigervnc-2770cfbf86141e4c4edaae0ab4228991b5e66bfb.zip |
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/
Diffstat (limited to 'unix/xserver')
-rw-r--r-- | unix/xserver/hw/vnc/Input.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/unix/xserver/hw/vnc/Input.cc b/unix/xserver/hw/vnc/Input.cc index 28b84c71..4ecd81e9 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 @@ void InputDevice::PointerMove(const rfb::Point &pos) const rfb::Point &InputDevice::getPointerPos(void) { + if (pointerDev != NULL) { + int x, y; + + GetSpritePosition (pointerDev, &x, &y); + cursorPos.x = x; + cursorPos.y = y; + } + return cursorPos; } |