When multiple monitors are setup in XP such that there is a monitor to the left of the primary monitor, mouse coordinates for these monitors have a negative X value. Unfortunately, the code in ClientConnection::WndProc does not handle signed numbers properly when extracting from the LPARAM, causing the "WindowFromPoint(coords)" call on line 2141 of ClientConnection.cpp to fail. This results in the mouse scroll wheel not working.
This patch properly extracts the signed coordinate values from LPARAM:
--- tightvnc-1.3.10\vncviewer\ClientConnection.cpp Sat Feb 07 23:29:42 2009
+++ tightvnc-1.3.10-mdr0\vncviewer\ClientConnection.cpp Tue Jun 02 13:44:22 2009
@@ -2132,8 +2132,8 @@
SetFocus(hwnd);
POINT coords;
- coords.x = LOWORD(lParam);
- coords.y = HIWORD(lParam);
+ coords.x = ((int)(short)LOWORD(lParam));
+ coords.y = ((int)(short)HIWORD(lParam));
if (iMsg == WM_MOUSEWHEEL) {
// Convert coordinates to position in our client area,
patch to fix bug
A bug has been reported back in 2005 about this issue and it's still not being fixed. What a shame.
Matthew, you're my hero!
This patch has been sitting here for a whole year. When is it going to make it into a release?
I have the same experience on Windows 7, connecting to RedHat EL5
I can confirm this bug on Windows 7 64bit. I have three monitor configuration with primary on the middle and secondary, tertiary to the left and right. When I move the VNC window to the left screen the scrolling does not work. While this is not a critical bug, it would be nice to have it fixed soon. I much prefer to keep my remote sessions on the left window. Cheers!
+1, Win7x86 (dual monitor) to Win7x64 (single). It's now 2014 (just installed lastest v2.7.10)... Can't believe this isn't fixed yet.
Isn't there a way to vote for bugs on this thing? ;-)
p.s. the UltraVNC people seem to have fixed it in theirs... :-o
Last edit: Tom Hundt 2014-02-12