Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2016-06-11 21:28:41 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2016-06-11 21:32:24 +0300
commit0b415700f450f1c845914b4c9841b635f2b0bb97 (patch)
tree8a483cc77bbe623b5f3dedbc10cb1474f9ca644a
parent42aec3b355b7692f60369c0d5333f54b029bfcad (diff)
Attempted fix for T48625: tablet button configured to right click not working on OS X.
-rw-r--r--intern/ghost/intern/GHOST_SystemCocoa.mm20
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: