xserver: Branch 'xorg-server-1.4-apple' - 2 commits

Jeremy Huddleston jeremyhu at kemper.freedesktop.org
Sun Dec 21 21:22:41 PST 2008


 configure.ac                |    2 +-
 hw/xquartz/X11Application.m |   22 +++++++++++++---------
 2 files changed, 14 insertions(+), 10 deletions(-)

New commits:
commit beed4ae69fc1a41c55653a6ed7f1bcdd6b7c4b8d
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Sun Dec 21 21:05:04 2008 -0800

    1.4.2-apple29

diff --git a/configure.ac b/configure.ac
index 15afe64..e8e6f5f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,7 +26,7 @@ dnl
 dnl Process this file with autoconf to create configure.
 
 AC_PREREQ(2.57)
-AC_INIT([xorg-server], 1.4.2-apple28, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
+AC_INIT([xorg-server], 1.4.2-apple29, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
 AC_CONFIG_SRCDIR([Makefile.am])
 AM_INIT_AUTOMAKE([dist-bzip2 foreign])
 AM_MAINTAINER_MODE
commit 33f43a7f03023bfbab25a957cb81fc25b4afa4ca
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Sun Dec 21 21:03:59 2008 -0800

    XQuartz: Don't use keycode 0 to determine !swallow since our most common key to swallow is actual keycode 0 (a)

diff --git a/hw/xquartz/X11Application.m b/hw/xquartz/X11Application.m
index 45aca24..2387d0d 100644
--- a/hw/xquartz/X11Application.m
+++ b/hw/xquartz/X11Application.m
@@ -266,7 +266,8 @@ static void message_kit_thread (SEL selector, NSObject *arg) {
         case NSKeyDown: case NSKeyUp:
             
             if(_x_active) {
-                static int swallow_up;
+                static BOOL do_swallow = NO;
+                static int swallow_keycode;
                 
                 if([e type] == NSKeyDown) {
                     /* Before that though, see if there are any global
@@ -274,17 +275,20 @@ static void message_kit_thread (SEL selector, NSObject *arg) {
 
                     if(darwinAppKitModMask & [e modifierFlags]) {
                         /* Override to force sending to Appkit */
-                        swallow_up = [e keyCode];
+                        swallow_keycode = [e keyCode];
+                        do_swallow = YES;
                         for_x = NO;
 #if XPLUGIN_VERSION >= 1
                     } else if(X11EnableKeyEquivalents &&
-                              xp_is_symbolic_hotkey_event([e eventRef])) {
-                        swallow_up = [e keyCode];
+                             xp_is_symbolic_hotkey_event([e eventRef])) {
+                        swallow_keycode = [e keyCode];
+                        do_swallow = YES;
                         for_x = NO;
 #endif
                     } else if(X11EnableKeyEquivalents &&
                               [[self mainMenu] performKeyEquivalent:e]) {
-                        swallow_up = [e keyCode];
+                        swallow_keycode = [e keyCode];
+                        do_swallow = YES;
                         for_appkit = NO;
                         for_x = NO;
                     } else if(!quartzEnableRootless
@@ -292,7 +296,8 @@ static void message_kit_thread (SEL selector, NSObject *arg) {
                               && ([e keyCode] == 0 /*a*/ || [e keyCode] == 53 /*Esc*/)) {
                         /* We have this here to force processing fullscreen 
                          * toggle even if X11EnableKeyEquivalents is disabled */
-                        swallow_up = [e keyCode];
+                        swallow_keycode = [e keyCode];
+                        do_swallow = YES;
                         for_x = NO;
                         for_appkit = NO;
                         DarwinSendDDXEvent(kXquartzToggleFullscreen, 0);
@@ -303,9 +308,8 @@ static void message_kit_thread (SEL selector, NSObject *arg) {
                 } else { /* KeyUp */
                     /* If we saw a key equivalent on the down, don't pass
                      * the up through to X. */
-                    
-                    if (swallow_up != 0 && [e keyCode] == swallow_up) {
-                        swallow_up = 0;
+                    if (do_swallow && [e keyCode] == swallow_keycode) {
+                        do_swallow = NO;
                         for_x = NO;
                     }
                 }


More information about the xorg-commit mailing list