diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2016-06-11 21:28:41 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2016-06-11 21:32:24 +0300 |
commit | 0b415700f450f1c845914b4c9841b635f2b0bb97 (patch) | |
tree | 8a483cc77bbe623b5f3dedbc10cb1474f9ca644a /intern | |
parent | 42aec3b355b7692f60369c0d5333f54b029bfcad (diff) |
Attempted fix for T48625: tablet button configured to right click not working on OS X.
Diffstat (limited to 'intern')
-rw-r--r-- | intern/ghost/intern/GHOST_SystemCocoa.mm | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/intern/ghost/intern/GHOST_SystemCocoa.mm b/intern/ghost/intern/GHOST_SystemCocoa.mm index c9855cfdf7e..bce390732fe 100644 --- a/intern/ghost/intern/GHOST_SystemCocoa.mm +++ b/intern/ghost/intern/GHOST_SystemCocoa.mm @@ -830,7 +830,7 @@ GHOST_TSuccess GHOST_SystemCocoa::handleWindowEvent(GHOST_TEventType eventType, window->updateDrawingContext(); pushEvent( new GHOST_Event(getMilliSeconds(), GHOST_kEventWindowSize, window) ); //Mouse up event is trapped by the resizing event loop, so send it anyway to the window manager - pushEvent(new GHOST_EventButton(getMilliSeconds(), GHOST_kEventButtonUp, window, convertButton(0))); + pushEvent(new GHOST_EventButton(getMilliSeconds(), GHOST_kEventButtonUp, window, GHOST_kButtonMaskLeft)); //m_ignoreWindowSizedMessages = true; } break; @@ -1278,19 +1278,29 @@ GHOST_TSuccess GHOST_SystemCocoa::handleMouseEvent(void *eventPtr) switch ([event type]) { case NSLeftMouseDown: + pushEvent(new GHOST_EventButton([event timestamp] * 1000, GHOST_kEventButtonDown, window, GHOST_kButtonMaskLeft)); + handleTabletEvent(event); //Handle tablet events combined with mouse events + break; case NSRightMouseDown: + pushEvent(new GHOST_EventButton([event timestamp] * 1000, GHOST_kEventButtonDown, window, GHOST_kButtonMaskRight)); + handleTabletEvent(event); //Handle tablet events combined with mouse events + break; case NSOtherMouseDown: pushEvent(new GHOST_EventButton([event timestamp] * 1000, GHOST_kEventButtonDown, window, convertButton([event buttonNumber]))); - //Handle tablet events combined with mouse events - handleTabletEvent(event); + handleTabletEvent(event); //Handle tablet events combined with mouse events break; case NSLeftMouseUp: + pushEvent(new GHOST_EventButton([event timestamp] * 1000, GHOST_kEventButtonUp, window, GHOST_kButtonMaskLeft)); + handleTabletEvent(event); //Handle tablet events combined with mouse events + break; case NSRightMouseUp: + pushEvent(new GHOST_EventButton([event timestamp] * 1000, GHOST_kEventButtonUp, window, GHOST_kButtonMaskRight)); + handleTabletEvent(event); //Handle tablet events combined with mouse events + break; case NSOtherMouseUp: pushEvent(new GHOST_EventButton([event timestamp] * 1000, GHOST_kEventButtonUp, window, convertButton([event buttonNumber]))); - //Handle tablet events combined with mouse events - handleTabletEvent(event); + handleTabletEvent(event); //Handle tablet events combined with mouse events break; case NSLeftMouseDragged: |