completing previous checkin.

This commit is contained in:
crs 2002-07-15 15:03:04 +00:00
parent 4b46862026
commit 0bfe12d6ab
2 changed files with 18 additions and 18 deletions

View File

@ -1,5 +1,5 @@
#include "CSynergyHook.h" #include "CSynergyHook.h"
#include "CConfig.h" #include "ProtocolTypes.h"
#include <zmouse.h> #include <zmouse.h>
// //
@ -205,16 +205,16 @@ mouseHook(int code, WPARAM wParam, LPARAM lParam)
const MOUSEHOOKSTRUCT* info = (const MOUSEHOOKSTRUCT*)lParam; const MOUSEHOOKSTRUCT* info = (const MOUSEHOOKSTRUCT*)lParam;
SInt32 x = (SInt32)info->pt.x; SInt32 x = (SInt32)info->pt.x;
SInt32 y = (SInt32)info->pt.y; SInt32 y = (SInt32)info->pt.y;
if (!inside && (g_zoneSides & CConfig::kLeftMask) != 0) { if (!inside && (g_zoneSides & kLeftMask) != 0) {
inside = (x < g_xScreen + g_zoneSize); inside = (x < g_xScreen + g_zoneSize);
} }
if (!inside && (g_zoneSides & CConfig::kRightMask) != 0) { if (!inside && (g_zoneSides & kRightMask) != 0) {
inside = (x >= g_xScreen + g_wScreen - g_zoneSize); inside = (x >= g_xScreen + g_wScreen - g_zoneSize);
} }
if (!inside && (g_zoneSides & CConfig::kTopMask) != 0) { if (!inside && (g_zoneSides & kTopMask) != 0) {
inside = (y < g_yScreen + g_zoneSize); inside = (y < g_yScreen + g_zoneSize);
} }
if (!inside && (g_zoneSides & CConfig::kBottomMask) != 0) { if (!inside && (g_zoneSides & kBottomMask) != 0) {
inside = (y >= g_yScreen + g_hScreen - g_zoneSize); inside = (y >= g_yScreen + g_hScreen - g_zoneSize);
} }
@ -481,6 +481,17 @@ init(DWORD threadID)
// message queue. // message queue.
g_threadID = threadID; g_threadID = threadID;
// set defaults
g_relay = false;
g_zoneSides = 0;
g_zoneSize = 0;
g_xScreen = 0;
g_yScreen = 0;
g_wScreen = 0;
g_hScreen = 0;
g_cursor = NULL;
g_cursorThread = 0;
return 1; return 1;
} }
@ -508,17 +519,6 @@ install()
return 0; return 0;
} }
// set defaults
g_relay = false;
g_zoneSides = 0;
g_zoneSize = 0;
g_xScreen = 0;
g_yScreen = 0;
g_wScreen = 0;
g_hScreen = 0;
g_cursor = NULL;
g_cursorThread = 0;
// check for mouse wheel support // check for mouse wheel support
g_wheelSupport = getWheelSupport(); g_wheelSupport = getWheelSupport();

View File

@ -42,7 +42,7 @@ RSC=rc.exe
# PROP Intermediate_Dir "ReleaseHook" # PROP Intermediate_Dir "ReleaseHook"
# PROP Target_Dir "" # PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "SYNRGYHK_EXPORTS" /YX /FD /c # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "SYNRGYHK_EXPORTS" /YX /FD /c
# ADD CPP /nologo /MT /W4 /GX /O2 /I "..\base" /I "..\net" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "SYNRGYHK_EXPORTS" /FD /c # ADD CPP /nologo /MT /W4 /GX /O2 /I "..\base" /I "..\net" /I "..\synergy" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "SYNRGYHK_EXPORTS" /FD /c
# SUBTRACT CPP /YX # SUBTRACT CPP /YX
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
@ -68,7 +68,7 @@ LINK32=link.exe
# PROP Intermediate_Dir "DebugHook" # PROP Intermediate_Dir "DebugHook"
# PROP Target_Dir "" # PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "SYNRGYHK_EXPORTS" /YX /FD /GZ /c # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "SYNRGYHK_EXPORTS" /YX /FD /GZ /c
# ADD CPP /nologo /MTd /W4 /Gm /GX /ZI /Od /I "..\base" /I "..\net" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "SYNRGYHK_EXPORTS" /FD /GZ /c # ADD CPP /nologo /MTd /W4 /Gm /GX /ZI /Od /I "..\synergy" /I "..\base" /I "..\net" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "SYNRGYHK_EXPORTS" /FD /GZ /c
# SUBTRACT CPP /YX # SUBTRACT CPP /YX
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32