mirror of
https://github.com/debauchee/barrier.git
synced 2026-11-28 14:55:38 +08:00
Merge remote-tracking branch 'origin/issue5620-sierra' into v1.8.5
This commit is contained in:
@@ -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")
|
||||
|
||||
@@ -122,7 +122,7 @@ OSXClipboard::add(EFormat format, const String & data)
|
||||
|
||||
PasteboardPutItemFlavor(
|
||||
m_pboard,
|
||||
(PasteboardItemID) 0,
|
||||
nullptr,
|
||||
flavorType,
|
||||
dataRef,
|
||||
kPasteboardFlavorNoFlags);
|
||||
|
||||
@@ -344,4 +344,6 @@ private:
|
||||
Mutex* m_carbonLoopMutex;
|
||||
CondVar<bool>* m_carbonLoopReady;
|
||||
#endif
|
||||
|
||||
class OSXScreenImpl* m_impl;
|
||||
};
|
||||
|
||||
@@ -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) || \
|
||||
@@ -112,7 +114,8 @@ OSXScreen::OSXScreen(IEventQueue* events, bool isPrimary, bool autoShowHideCurso
|
||||
m_lastSingleClickYCursor(0),
|
||||
m_autoShowHideCursor(autoShowHideCursor),
|
||||
m_events(events),
|
||||
m_getDropTargetThread(NULL)
|
||||
m_getDropTargetThread(NULL),
|
||||
m_impl(NULL)
|
||||
{
|
||||
try {
|
||||
m_displayID = CGMainDisplayID();
|
||||
@@ -526,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)
|
||||
Reference in New Issue
Block a user