diff options
| author | 2019-07-18 01:31:55 -0400 | |
|---|---|---|
| committer | 2019-07-18 01:31:55 -0400 | |
| commit | 0f98c212db6e4cfd750dc1a52a31ddf9396a5e07 (patch) | |
| tree | bd0bd43b383bccc43d1950fd356472d69f9cd0f1 /src/lib/platform/OSXScreen.mm | |
| parent | d8c416864c505aea70c70fd0d5f7991aa50d2ff9 (diff) | |
| parent | a916009d4b29995ea8ad61ad47a51c2ee1fa80bc (diff) | |
Update upstream source from tag 'upstream/2.3.0+dfsg'
Update to upstream version '2.3.0+dfsg'
with Debian dir f701d582fe3b6bb5189dbf035102670db9c2516b
Diffstat (limited to 'src/lib/platform/OSXScreen.mm')
| -rw-r--r-- | src/lib/platform/OSXScreen.mm | 45 |
1 files changed, 16 insertions, 29 deletions
diff --git a/src/lib/platform/OSXScreen.mm b/src/lib/platform/OSXScreen.mm index 1e0268e..8c7e24c 100644 --- a/src/lib/platform/OSXScreen.mm +++ b/src/lib/platform/OSXScreen.mm @@ -1263,36 +1263,23 @@ OSXScreen::onKey(CGEventRef event) return true; } - // check for hot key. when we're on a secondary screen we disable - // all hotkeys so we can capture the OS defined hot keys as regular - // keystrokes but that means we don't get our own hot keys either. - // so we check for a key/modifier match in our hot key map. - if (!m_isOnScreen) { - HotKeyToIDMap::const_iterator i = - m_hotKeyToIDMap.find(HotKeyItem(virtualKey, - m_keyState->mapModifiersToCarbon(macMask) - & 0xff00u)); - if (i != m_hotKeyToIDMap.end()) { - UInt32 id = i->second; - - // determine event type - Event::Type type; - //UInt32 eventKind = GetEventKind(event); - if (eventKind == kCGEventKeyDown) { - type = m_events->forIPrimaryScreen().hotKeyDown(); - } - else if (eventKind == kCGEventKeyUp) { - type = m_events->forIPrimaryScreen().hotKeyUp(); - } - else { - return false; - } - - m_events->addEvent(Event(type, getEventTarget(), - HotKeyInfo::alloc(id))); - - return true; + HotKeyToIDMap::const_iterator i = m_hotKeyToIDMap.find(HotKeyItem(virtualKey, m_keyState->mapModifiersToCarbon(macMask) & 0xff00u)); + if (i != m_hotKeyToIDMap.end()) { + UInt32 id = i->second; + // determine event type + Event::Type type; + //UInt32 eventKind = GetEventKind(event); + if (eventKind == kCGEventKeyDown) { + type = m_events->forIPrimaryScreen().hotKeyDown(); } + else if (eventKind == kCGEventKeyUp) { + type = m_events->forIPrimaryScreen().hotKeyUp(); + } + else { + return false; + } + m_events->addEvent(Event(type, getEventTarget(), HotKeyInfo::alloc(id))); + return true; } // decode event type |
