Add support for building with 64-bit architectures on OS X.

This patch brings full 64-bit compatibility to Synergy on OS X by
replacing all obsolete 32-bit only Carbon functions with modern
equivalents. All functions introduced have been available since 10.4 so
this won't affect the minimum deployment target. Specifically:

Creating an empty CGEvent and getting its location is behaviourally
identical to GetGlobalMouse, and yes, both are in flipped coordinates.
This was tested with a multi-monitor configuration as well.

TrackMouseLocationWithOptions is behaviourally identical to
GetGlobalMouse in these cases because the timeout was 0 and none of the
other out params were used, except for the MouseTrackingResult in one
call was checked against kMouseTrackingTimedOut. Since the timeout was 0
and not kEventDurationForever, that value never could have been returned
anyway.

Instead of attempting to define SIntXX and UIntXX manually, MacTypes.h
is included on OS X. These types were wrong in 64-bit mode because of
this, causing type redefinition errors.
This commit is contained in:
Jake Petroules 2014-10-15 19:00:30 -07:00
parent 70c8f98615
commit 7dd2db25ec
5 changed files with 41 additions and 33 deletions

View file

@ -142,7 +142,7 @@ COSXScreenSaver::launchTerminationCallback(
OSStatus result;
ProcessSerialNumber psn;
EventParamType actualType;
UInt32 actualSize;
ByteCount actualSize;
result = GetEventParameter(theEvent, kEventParamProcessID,
typeProcessSerialNumber, &actualType,