[aseprite] 173/196: Make Ctrl+Tab work on Skia/OS X port
Tobias Hansen
thansen at moszumanska.debian.org
Wed Apr 20 18:50:17 UTC 2016
This is an automated email from the git hooks/post-receive script.
thansen pushed a commit to branch master
in repository aseprite.
commit 4acf12a47890e506999218e9e9aab77033e8d2ba
Author: David Capello <davidcapello at gmail.com>
Date: Mon Apr 11 14:53:18 2016 -0300
Make Ctrl+Tab work on Skia/OS X port
---
src/she/osx/event_queue.h | 2 +-
src/she/osx/event_queue.mm | 18 +++++++++++++++---
2 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/src/she/osx/event_queue.h b/src/she/osx/event_queue.h
index 2a14fe5..4e0052e 100644
--- a/src/she/osx/event_queue.h
+++ b/src/she/osx/event_queue.h
@@ -1,5 +1,5 @@
// SHE library
-// Copyright (C) 2012-2015 David Capello
+// Copyright (C) 2015-2016 David Capello
//
// This file is released under the terms of the MIT license.
// Read LICENSE.txt for more information.
diff --git a/src/she/osx/event_queue.mm b/src/she/osx/event_queue.mm
index ad21efd..c80ea18 100644
--- a/src/she/osx/event_queue.mm
+++ b/src/she/osx/event_queue.mm
@@ -1,5 +1,5 @@
// SHE library
-// Copyright (C) 2012-2015 David Capello
+// Copyright (C) 2015-2016 David Capello
//
// This file is released under the terms of the MIT license.
// Read LICENSE.txt for more information.
@@ -9,6 +9,7 @@
#endif
#include <Cocoa/Cocoa.h>
+#include <Carbon/Carbon.h>
#include "she/osx/event_queue.h"
@@ -30,8 +31,19 @@ retry:;
untilDate:[NSDate distantPast]
inMode:NSDefaultRunLoopMode
dequeue:YES];
- if (event)
- [app sendEvent: event];
+ if (event) {
+ // Intercept Control+Tab and send it to the main NSView. Without
+ // this, the NSApplication intercepts the key combination and
+ // use it to go to the next key view.
+ if (event.type == NSKeyDown &&
+ event.modifierFlags & NSControlKeyMask &&
+ event.keyCode == kVK_Tab) {
+ [app.mainWindow.contentView keyDown:event];
+ }
+ else {
+ [app sendEvent:event];
+ }
+ }
} while (event);
if (!m_events.try_pop(ev)) {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/aseprite.git
More information about the Pkg-games-commits
mailing list