diff --git a/src/lib/platform/OSXClipboard.cpp b/src/lib/platform/OSXClipboard.cpp index 7dae2081..288b2009 100644 --- a/src/lib/platform/OSXClipboard.cpp +++ b/src/lib/platform/OSXClipboard.cpp @@ -119,10 +119,11 @@ OSXClipboard::add(EFormat format, const String & data) String osXData = converter->fromIClipboard(data); CFStringRef flavorType = converter->getOSXFormat(); CFDataRef dataRef = CFDataCreate(kCFAllocatorDefault, (UInt8 *)osXData.data(), osXData.size()); + PasteboardItemID itemID = 0; PasteboardPutItemFlavor( m_pboard, - nullptr, + itemID, flavorType, dataRef, kPasteboardFlavorNoFlags); diff --git a/src/lib/platform/OSXKeyState.cpp b/src/lib/platform/OSXKeyState.cpp index 2b08342e..8ab0bc89 100644 --- a/src/lib/platform/OSXKeyState.cpp +++ b/src/lib/platform/OSXKeyState.cpp @@ -120,7 +120,6 @@ static const KeyEntry s_controlKeys[] = { { kKeyCapsLock, s_capsLockVK }, { kKeyMissionControl, s_missionControlVK }, - { kKeyLaunchpad, s_launchpadVK } { kKeyLaunchpad, s_launchpadVK }, { kKeyBrightnessUp, s_brightnessUp }, { kKeyBrightnessDown, s_brightnessDown } diff --git a/src/lib/platform/OSXScreen.mm b/src/lib/platform/OSXScreen.mm index 2a6f7b8c..8e619306 100644 --- a/src/lib/platform/OSXScreen.mm +++ b/src/lib/platform/OSXScreen.mm @@ -44,6 +44,7 @@ #include #include #include +#include // This isn't in any Apple SDK that I know of as of yet. enum { @@ -475,7 +476,7 @@ OSXScreen::postMouseEvent(CGPoint& pos) const type = thisButtonType[kMouseButtonDragged]; } - CGEventRef event = CGEventCreateMouseEvent(NULL, type, pos, button); + CGEventRef event = CGEventCreateMouseEvent(NULL, type, pos, static_cast(button)); // Dragging events also need the click state CGEventSetIntegerValueField(event, kCGMouseEventClickState, m_clickState); @@ -561,7 +562,7 @@ OSXScreen::fakeMouseButton(ButtonID id, bool press) MouseButtonEventMapType thisButtonMap = MouseButtonEventMap[index]; CGEventType type = thisButtonMap[state]; - CGEventRef event = CGEventCreateMouseEvent(NULL, type, pos, index); + CGEventRef event = CGEventCreateMouseEvent(NULL, type, pos, static_cast(index)); CGEventSetIntegerValueField(event, kCGMouseEventClickState, m_clickState); @@ -754,7 +755,7 @@ OSXScreen::enable() // FIXME -- start watching jump zones // kCGEventTapOptionDefault = 0x00000000 (Missing in 10.4, so specified literally) - m_eventTapPort = CGEventTapCreate(kCGHIDEventTap, kCGHeadInsertEventTap, 0, + m_eventTapPort = CGEventTapCreate(kCGHIDEventTap, kCGHeadInsertEventTap, kCGEventTapOptionDefault, kCGEventMaskForAllEvents, handleCGInputEvent, this); @@ -772,7 +773,7 @@ OSXScreen::enable() // there may be a better way to do this, but we register an event handler even if we're // not on the primary display (acting as a client). This way, if a local event comes in // (either keyboard or mouse), we can make sure to show the cursor if we've hidden it. - m_eventTapPort = CGEventTapCreate(kCGHIDEventTap, kCGHeadInsertEventTap, 0, + m_eventTapPort = CGEventTapCreate(kCGHIDEventTap, kCGHeadInsertEventTap, kCGEventTapOptionDefault, kCGEventMaskForAllEvents, handleCGInputEventSecondary, this); @@ -1966,7 +1967,8 @@ OSXScreen::handleCGInputEvent(CGEventTapProxy proxy, break; case NX_NULLEVENT: break; - case NX_SYSDEFINED: + default: + if (type == NX_SYSDEFINED) { if (isMediaKeyEvent (event)) { LOG((CLOG_DEBUG2 "detected media key event")); screen->onMediaKey (event); @@ -1975,9 +1977,8 @@ OSXScreen::handleCGInputEvent(CGEventTapProxy proxy, return event; } break; - case NX_NUMPROCS: - break; - default: + } + LOG((CLOG_WARN "unknown quartz event type: 0x%02x", type)); }