diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-05-14 01:19:30 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-05-14 01:19:30 +0400 |
commit | 213408d4c99cc3c2fa8ae52962fcc8097b7a0c39 (patch) | |
tree | 97783e13949ffa8740824d0ab71156c6fea0b9dc /intern | |
parent | 3e0722328e942173827b4622bb466705ef04443c (diff) |
Fix #35340: 3D manipulator not working right after undoing with cmd+Z on OS X.
Another issue with the recent Ghost changes here. For some reason key up events
are not coming through when the command key is pressed. I can't figure out why,
for now just always handle them, still fixes the original bug.
Diffstat (limited to 'intern')
-rw-r--r-- | intern/ghost/intern/GHOST_SystemCocoa.mm | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/intern/ghost/intern/GHOST_SystemCocoa.mm b/intern/ghost/intern/GHOST_SystemCocoa.mm index 76bc68d5bfe..0be26e594f1 100644 --- a/intern/ghost/intern/GHOST_SystemCocoa.mm +++ b/intern/ghost/intern/GHOST_SystemCocoa.mm @@ -939,12 +939,18 @@ bool GHOST_SystemCocoa::processEvents(bool waitForEvent) // get keyDown events delivered to the view because they are // special hotkeys to switch between views, so override directly - if([event type] == NSKeyDown && + if ([event type] == NSKeyDown && [event keyCode] == kVK_Tab && ([event modifierFlags] & NSControlKeyMask)) { handleKeyEvent(event); } else { + // For some reason NSApp is swallowing the key up events when command + // key is pressed, even if there seems to be no apparent reason to do + // so, as a workaround we always handle these up events. + if ([event type] == NSKeyUp && ([event modifierFlags] & NSCommandKeyMask)) + handleKeyEvent(event); + [NSApp sendEvent:event]; } |