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.
Many security solutions forbid other program from accessing their own process. So if ProcessIdToSessionId() is failed, simply ignore it.
Signed-off-by: SeokYeon Hwang <caramis@gmail.com>
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.