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
path: root/intern
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2013-05-13 02:15:05 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2013-05-13 02:15:05 +0400
commit5c2355d3640618084d326e7f09bd83e118251ea9 (patch)
tree2eaccd69e2f247aa51fcad571f8acbf4ced6bd4b /intern
parent33651da150b6085ddf1e3973fcac5eda8f7e91ec (diff)
Fix ctrl+(shift)+tab shortcut key not working on OS X after recent bugfix to
interact better with system shortcuts. This is a special shortcut for switching between views and does not get delivered directly to our view when we pass it through the application key event handling path. We only have a single OpenGL view, so there's no need to pass it on to the application, instead just interpret it directly.
Diffstat (limited to 'intern')
-rw-r--r--intern/ghost/intern/GHOST_SystemCocoa.mm15
1 files changed, 14 insertions, 1 deletions
diff --git a/intern/ghost/intern/GHOST_SystemCocoa.mm b/intern/ghost/intern/GHOST_SystemCocoa.mm
index 114a5619fb4..76bc68d5bfe 100644
--- a/intern/ghost/intern/GHOST_SystemCocoa.mm
+++ b/intern/ghost/intern/GHOST_SystemCocoa.mm
@@ -934,7 +934,20 @@ bool GHOST_SystemCocoa::processEvents(bool waitForEvent)
// Send event to NSApp to ensure Mac wide events are handled,
// this will send events to CocoaWindow which will call back
// to handleKeyEvent, handleMouseEvent and handleTabletEvent
- [NSApp sendEvent:event];
+
+ // There is on special exception for ctrl+(shift)+tab. We do not
+ // get keyDown events delivered to the view because they are
+ // special hotkeys to switch between views, so override directly
+
+ if([event type] == NSKeyDown &&
+ [event keyCode] == kVK_Tab &&
+ ([event modifierFlags] & NSControlKeyMask)) {
+ handleKeyEvent(event);
+ }
+ else {
+ [NSApp sendEvent:event];
+ }
+
[pool drain];
} while (event != nil);
#if 0