Fixed stupid errors introduced by last attempt to fix broken

mouse behavior on multimonitor windows systems.  Those errors
broke synergy on all windows systems running as a server.
Also added an attempt to reduce the occasional jump that can
occur when switching screens when windows is the server.
This commit is contained in:
crs
2003-01-18 14:36:19 +00:00
parent 68a591210b
commit e86e552ac8
3 changed files with 25 additions and 3 deletions

View File

@@ -229,8 +229,8 @@ mouseHook(int code, WPARAM wParam, LPARAM lParam)
// desktop coordinates.
bool inside = false;
const MOUSEHOOKSTRUCT* info = (const MOUSEHOOKSTRUCT*)lParam;
SInt32 x = (SInt32)info->pt.x + g_xScreen;
SInt32 y = (SInt32)info->pt.y + g_yScreen;
SInt32 x = (SInt32)info->pt.x;
SInt32 y = (SInt32)info->pt.y;
if (!inside && (g_zoneSides & kLeftMask) != 0) {
inside = (x < g_xScreen + g_zoneSize);
}
@@ -246,6 +246,8 @@ mouseHook(int code, WPARAM wParam, LPARAM lParam)
// if inside then eat event and notify our window
if (inside) {
x += g_xScreen;
y += g_yScreen;
restoreCursor();
PostThreadMessage(g_threadID, SYNERGY_MSG_MOUSE_MOVE, x, y);
return 1;