This is an automated email from the git hooks/post-receive script. thansen pushed a commit to branch master in repository aseprite.
commit 8e06d61f749176ccf497794a9cf0f934c5cfe398 Author: David Capello <[email protected]> Date: Mon Apr 11 14:41:01 2016 -0300 Use NSWindow noResponseFor: to avoid beeps on Skia/OSX fork --- src/she/osx/view.mm | 4 ---- src/she/osx/window.mm | 12 +++++++++++- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/she/osx/view.mm b/src/she/osx/view.mm index 06ae186..1ba6f3c 100644 --- a/src/she/osx/view.mm +++ b/src/she/osx/view.mm @@ -131,9 +131,7 @@ bool is_key_pressed(KeyScancode scancode) - (void)keyDown:(NSEvent*)event { -#if 0 // Avoid beeps TODO comment this when the OS X menus are ready [super keyDown:event]; -#endif KeyScancode scancode = cocoavk_to_scancode(event.keyCode); if (scancode >= 0 && scancode < kKeyScancodes) @@ -155,9 +153,7 @@ bool is_key_pressed(KeyScancode scancode) - (void)keyUp:(NSEvent*)event { -#if 0 [super keyUp:event]; -#endif KeyScancode scancode = cocoavk_to_scancode(event.keyCode); if (scancode >= 0 && scancode < kKeyScancodes) diff --git a/src/she/osx/window.mm b/src/she/osx/window.mm index 9c4982d..200941e 100644 --- a/src/she/osx/window.mm +++ b/src/she/osx/window.mm @@ -1,5 +1,5 @@ // SHE library -// Copyright (C) 2012-2015 David Capello +// Copyright (C) 2012-2016 David Capello // // This file is released under the terms of the MIT license. // Read LICENSE.txt for more information. @@ -158,4 +158,14 @@ using namespace she; return (nsCursor != nil ? YES: NO); } +- (void)noResponderFor:(SEL)eventSelector +{ + if (eventSelector == @selector(keyDown:)) { + // Do nothing (avoid beep) + } + else { + [super noResponderFor:eventSelector]; + } +} + @end -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/aseprite.git _______________________________________________ Pkg-games-commits mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits

