#5620 Remove deprecated NXClickTime call

This commit is contained in:
Andrew Nelless 2016-10-12 16:10:57 +01:00
parent df88faaad8
commit 5ea1fdc7c6
2 changed files with 4 additions and 4 deletions

View File

@ -19,7 +19,7 @@ if (WIN32)
file(GLOB sources "MSWindows*.cpp") file(GLOB sources "MSWindows*.cpp")
elseif (APPLE) elseif (APPLE)
file(GLOB headers "OSX*.h" "IOSX*.h") file(GLOB headers "OSX*.h" "IOSX*.h")
file(GLOB sources "OSX*.cpp" "IOSX*.cpp" "OSX*.m") file(GLOB sources "OSX*.cpp" "IOSX*.cpp" "OSX*.m" "OSX*.mm")
elseif (UNIX) elseif (UNIX)
file(GLOB headers "XWindows*.h") file(GLOB headers "XWindows*.h")
file(GLOB sources "XWindows*.cpp") file(GLOB sources "XWindows*.cpp")

View File

@ -45,6 +45,8 @@
#include <AvailabilityMacros.h> #include <AvailabilityMacros.h>
#include <IOKit/hidsystem/event_status_driver.h> #include <IOKit/hidsystem/event_status_driver.h>
#import <appkit/NSEvent.h>
// Set some enums for fast user switching if we're building with an SDK // Set some enums for fast user switching if we're building with an SDK
// from before such support was added. // from before such support was added.
#if !defined(MAC_OS_X_VERSION_10_3) || \ #if !defined(MAC_OS_X_VERSION_10_3) || \
@ -527,9 +529,7 @@ OSXScreen::fakeMouseButton(ButtonID id, bool press)
// we define our own defaults. // we define our own defaults.
const double maxDiff = sqrt(2) + 0.0001; const double maxDiff = sqrt(2) + 0.0001;
double clickTime = [NSEvent doubleClickInterval];
NXEventHandle handle = NXOpenEventStatus();
double clickTime = NXClickTime(handle);
// As long as the click is within the time window and distance window // As long as the click is within the time window and distance window
// increase clickState (double click, triple click, etc) // increase clickState (double click, triple click, etc)