From 5ea1fdc7c69059a8f94cbb79e2a5e6bf53b2f1c0 Mon Sep 17 00:00:00 2001 From: Andrew Nelless Date: Wed, 12 Oct 2016 16:10:57 +0100 Subject: [PATCH] #5620 Remove deprecated NXClickTime call --- src/lib/platform/CMakeLists.txt | 2 +- src/lib/platform/OSXScreen.mm | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/platform/CMakeLists.txt b/src/lib/platform/CMakeLists.txt index 6c272c21..481d8ef9 100644 --- a/src/lib/platform/CMakeLists.txt +++ b/src/lib/platform/CMakeLists.txt @@ -19,7 +19,7 @@ if (WIN32) file(GLOB sources "MSWindows*.cpp") elseif (APPLE) 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) file(GLOB headers "XWindows*.h") file(GLOB sources "XWindows*.cpp") diff --git a/src/lib/platform/OSXScreen.mm b/src/lib/platform/OSXScreen.mm index aa8f1e95..2c2e66d6 100644 --- a/src/lib/platform/OSXScreen.mm +++ b/src/lib/platform/OSXScreen.mm @@ -45,6 +45,8 @@ #include #include +#import + // Set some enums for fast user switching if we're building with an SDK // from before such support was added. #if !defined(MAC_OS_X_VERSION_10_3) || \ @@ -527,9 +529,7 @@ OSXScreen::fakeMouseButton(ButtonID id, bool press) // we define our own defaults. const double maxDiff = sqrt(2) + 0.0001; - - NXEventHandle handle = NXOpenEventStatus(); - double clickTime = NXClickTime(handle); + double clickTime = [NSEvent doubleClickInterval]; // As long as the click is within the time window and distance window // increase clickState (double click, triple click, etc)