This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

#5620 Remove deprecated NXClickTime call

  • Loading branch information...
nlyan committed Oct 12, 2016
1 parent df88faa commit 5ea1fdc7c69059a8f94cbb79e2a5e6bf53b2f1c0
Showing with 4 additions and 4 deletions.
  1. +1 −1 src/lib/platform/CMakeLists.txt
  2. +3 −3 src/lib/platform/OSXScreen.mm
@@ -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")
@@ -45,6 +45,8 @@
#include <AvailabilityMacros.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
// from before such support was added.
#if !defined(MAC_OS_X_VERSION_10_3) || \
@@ -527,9 +529,7 @@
// 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)

0 comments on commit 5ea1fdc

Please sign in to comment.