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

Jeremy Huddleston jeremyhu at kemper.freedesktop.org
Tue Oct 21 09:12:52 PDT 2008


 hw/xquartz/X11Application.m |   35 +++++++++++++++++++++++++++--------
 hw/xquartz/darwin.c         |    3 ---
 hw/xquartz/quartz.c         |    3 +--
 hw/xquartz/quartzCommon.h   |    1 -
 4 files changed, 28 insertions(+), 14 deletions(-)

New commits:
commit 10090a132a0110fe24c8c886d9f53e6e947f8038
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Tue Oct 21 09:11:59 2008 -0700

    XQuartz: Only send mouse events while in the background if we're over a visible window.
    
    This "breaks" xeyes but gets rid of annoying tooltips.

diff --git a/hw/xquartz/X11Application.m b/hw/xquartz/X11Application.m
index c1dee43..4851b31 100644
--- a/hw/xquartz/X11Application.m
+++ b/hw/xquartz/X11Application.m
@@ -941,6 +941,22 @@ extern int darwin_modifier_flags; // darwinEvents.c
                 pDev = darwinTabletCurrent;
             }
 
+            if(!quartzServerVisible) {
+                xp_window_id wid;
+                
+                /* Sigh. Need to check that we're really over one of
+                 * our windows. (We need to receive pointer events while
+                 * not in the foreground, and the only way to do that
+                 * right now is to ask for _all_ pointer events..)
+                 */
+                
+                wid = 0;
+                xp_find_window(pointer_x, pointer_y, 0, &wid);
+                
+                if (wid == 0)
+                    return;        
+            }
+            
             DarwinSendPointerEvents(pDev, ev_type, ev_button, pointer_x, pointer_y,
                                     pressure, tilt_x, tilt_y);
             
commit 22a54e46176c9cbdfaaa59ef33a6ae6a9c4969ef
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Tue Oct 21 09:07:08 2008 -0700

    XQuartz: More fullscreen fixes
      Start in rooted mode when enabled
      Make the hotkey cmd-alt-a behave

diff --git a/hw/xquartz/X11Application.m b/hw/xquartz/X11Application.m
index 5df3a08..c1dee43 100644
--- a/hw/xquartz/X11Application.m
+++ b/hw/xquartz/X11Application.m
@@ -231,18 +231,12 @@ static void message_kit_thread (SEL selector, NSObject *arg) {
                 
                 if([e type] == NSKeyDown) {
                     /* Before that though, see if there are any global
-                     shortcuts bound to it. */
+                     * shortcuts bound to it. */
 
                     if(darwinAppKitModMask & [e modifierFlags]) {
                         /* Override to force sending to Appkit */
                         swallow_up = [e keyCode];
                         for_x = NO;
-                    } else if(!quartzEnableRootless
-                              && ([e modifierFlags] & ALL_KEY_MASKS) == (NSCommandKeyMask | NSAlternateKeyMask)
-                              && ([e keyCode] == 0 /*a*/ || [e keyCode] == 53 /*Esc*/)) {
-                        swallow_up = [e keyCode];
-                        for_x = NO;
-                        DarwinSendDDXEvent(kXquartzToggleFullscreen, 0);
 #if XPLUGIN_VERSION >= 1
                     } else if(X11EnableKeyEquivalents &&
                               xp_is_symbolic_hotkey_event([e eventRef])) {
@@ -251,16 +245,25 @@ static void message_kit_thread (SEL selector, NSObject *arg) {
 #endif
                     } else if(X11EnableKeyEquivalents &&
                               [[self mainMenu] performKeyEquivalent:e]) {
+                        swallow_up = [e keyCode];
                         for_appkit = NO;
+                        for_x = NO;
+                    } else if(!quartzEnableRootless
+                              && ([e modifierFlags] & ALL_KEY_MASKS) == (NSCommandKeyMask | NSAlternateKeyMask)
+                              && ([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];
                         for_x = NO;
+                        for_appkit = NO;
+                        DarwinSendDDXEvent(kXquartzToggleFullscreen, 0);
                     } else {
                         /* No kit window is focused, so send it to X. */
                         for_appkit = NO;
                     }
                 } else { /* KeyUp */
                     /* If we saw a key equivalent on the down, don't pass
-                     the up through to X. */
+                     * the up through to X. */
                     
                     if (swallow_up != 0 && [e keyCode] == swallow_up) {
                         swallow_up = 0;
diff --git a/hw/xquartz/darwin.c b/hw/xquartz/darwin.c
index 890fb6f..277881f 100644
--- a/hw/xquartz/darwin.c
+++ b/hw/xquartz/darwin.c
@@ -822,9 +822,6 @@ void ddxUseMsg( void )
 void ddxGiveUp( void )
 {
     ErrorF( "Quitting Xquartz...\n" );
-
-    //if (!quartzRootless)
-    //    quartzProcs->ReleaseScreens();
 }
 
 
diff --git a/hw/xquartz/quartz.c b/hw/xquartz/quartz.c
index 8032705..fe87ebb 100644
--- a/hw/xquartz/quartz.c
+++ b/hw/xquartz/quartz.c
@@ -68,11 +68,10 @@
 
 // Shared global variables for Quartz modes
 int                     quartzEventWriteFD = -1;
-int                     quartzRootless = -1;
 int                     quartzUseSysBeep = 0;
 int                     quartzUseAGL = 1;
 int                     quartzEnableKeyEquivalents = 1;
-int                     quartzServerVisible = TRUE;
+int                     quartzServerVisible = FALSE;
 int                     quartzServerQuitting = FALSE;
 int                     quartzScreenIndex = 0;
 int                     aquaMenuBarHeight = 0;
diff --git a/hw/xquartz/quartzCommon.h b/hw/xquartz/quartzCommon.h
index 5371d29..4bbc144 100644
--- a/hw/xquartz/quartzCommon.h
+++ b/hw/xquartz/quartzCommon.h
@@ -54,7 +54,6 @@ typedef struct {
 extern int              quartzEventWriteFD;
 
 // User preferences used by Quartz modes
-extern int              quartzRootless;
 extern int              quartzUseSysBeep;
 extern int              focusOnNewWindow;
 extern int              quartzUseAGL;


More information about the xorg-commit mailing list