xserver: Branch 'master' - 3 commits

Keith Packard keithp at kemper.freedesktop.org
Wed Jun 29 18:51:33 PDT 2011


 configure.ac                        |    4 ++--
 glx/glapi_gentable.c                |    6 ++++++
 hw/xquartz/X11Application.m         |   25 ++++++++++++++++---------
 hw/xquartz/mach-startup/Makefile.am |    4 +++-
 4 files changed, 27 insertions(+), 12 deletions(-)

New commits:
commit 38d55f06cfbf4b05fee0aef8f97f90e835beaacb
Author: Jon TURNEY <jon.turney at dronecode.org.uk>
Date:   Mon Jun 27 15:06:16 2011 +0100

    Guard use of backtrace() with HAVE_BACKTRACE
    
    Guard the use of backtrace() with HAVE_BACKTRACE, since we already
    have the autoconf machinery for setting that.
    
    For the moment, assume dladdr() is available when backtrace() is
    
    Signed-off-by: Jon TURNEY <jon.turney at dronecode.org.uk>
    Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>

diff --git a/glx/glapi_gentable.c b/glx/glapi_gentable.c
index a9ba3af..b49ae20 100644
--- a/glx/glapi_gentable.c
+++ b/glx/glapi_gentable.c
@@ -31,7 +31,10 @@
 #include <dix-config.h>
 #endif
 
+#ifdef HAVE_BACKTRACE
 #include <execinfo.h>
+#endif
+
 #include <dlfcn.h>
 #include <stdlib.h>
 #include <stdio.h>
@@ -46,6 +49,8 @@
 static void
 __glapi_gentable_NoOp(void) {
     const char *fstr = "Unknown";
+
+#ifdef HAVE_BACKTRACE
     void *frames[2];
 
     if(backtrace(frames, 2) == 2) {
@@ -54,6 +59,7 @@ __glapi_gentable_NoOp(void) {
         if(info.dli_sname)
             fstr = info.dli_sname;
     }
+#endif
 
     LogMessage(X_ERROR, "GLX: Call to unimplemented API: %s\n", fstr);
 }
commit bea57392c724f439987832b422941ae897953e4a
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date:   Sat Jun 25 11:29:53 2011 -0700

    XQuartz: Fix Makefile dependencies
    
    automake generates _DEPENDENCIES from _LIBADD, but it strips out variables.
    This resulted in not relinking if some components were rebuilt (like
    libdix, libos, etc).
    
    Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>

diff --git a/configure.ac b/configure.ac
index 67a7f13..6ced61b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1889,8 +1889,8 @@ if test "x$XQUARTZ" = xyes; then
 	AC_DEFINE(XQUARTZ,1,[Have Quartz])
 	AC_DEFINE(ROOTLESS,1,[Build Rootless code])
 
-	DARWIN_LIBS="$MI_LIB $OS_LIB $DIX_LIB $MAIN_LIB $FB_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $XPSTUBS_LIB"
-	AC_SUBST([DARWIN_LIBS])
+	XQUARTZ_LIBS="$MAIN_LIB $FB_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $XPSTUBS_LIB"
+	AC_SUBST([XQUARTZ_LIBS])
 
 	AC_CHECK_LIB([Xplugin],[xp_init],[:])
 
diff --git a/hw/xquartz/mach-startup/Makefile.am b/hw/xquartz/mach-startup/Makefile.am
index 8e49ea8..0b1f897 100644
--- a/hw/xquartz/mach-startup/Makefile.am
+++ b/hw/xquartz/mach-startup/Makefile.am
@@ -22,7 +22,7 @@ X11_bin_LDADD = \
 	$(top_builddir)/dix/dixfonts.lo \
 	$(top_builddir)/miext/rootless/librootless.la \
 	$(top_builddir)/hw/xquartz/pbproxy/libxpbproxy.la \
-	$(DARWIN_LIBS) $(MAIN_LIB) $(XSERVER_LIBS)
+	$(XQUARTZ_LIBS) $(XSERVER_LIBS)
 
 X11_bin_LDFLAGS =  \
 	$(XSERVER_SYS_LIBS) -lXplugin \
@@ -52,6 +52,8 @@ X11_bin_LDADD += \
 	$(top_builddir)/record/librecord.la
 endif
 
+X11_bin_DEPENDENCIES = $(X11_bin_LDADD)
+
 bin_PROGRAMS = Xquartz
 
 dist_Xquartz_SOURCES = \
commit c8b80a82d97d92d445c1c0af6dba42c9de7c56cd
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date:   Tue Jun 21 21:14:46 2011 -0700

    XQuartz: Make a call to activateIgnoringOtherApps in our NSApplicationActivatedEventType handler
    
    In addition, this change will not call into the X11 activation unless an X11
    window was active when we deactivated.  We can't rely on the event and current
    key windows because the key window will be nil until activated, and the event
    will only reference the window if the window was clicked (whereas it will be
    nil if we activated via dock or cmd-tab).
    
    Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>

diff --git a/hw/xquartz/X11Application.m b/hw/xquartz/X11Application.m
index 31aa9b9..3973110 100644
--- a/hw/xquartz/X11Application.m
+++ b/hw/xquartz/X11Application.m
@@ -338,18 +338,21 @@ static void message_kit_thread (SEL selector, NSObject *arg) {
             
         case NSAppKitDefined:
             switch ([e subtype]) {
+                static BOOL x_was_active = NO;
+
                 case NSApplicationActivatedEventType:
                     for_x = NO;
-                    if ([self modalWindow] == nil) {
+                    if ([e window] == nil && x_was_active) {
                         BOOL order_all_windows = YES, workspaces, ok;
                         for_appkit = NO;
-                        
-                        /* FIXME: hack to avoid having to pass the event to appkit,
-                         which would cause it to raise one of its windows. */
+
+                        /* FIXME: This is a hack to avoid passing the event to AppKit which
+                         *        would result in it raising one of its windows.
+                         */
                         _appFlags._active = YES;
-                        
-                        [self activateX:YES];
-                        
+
+                        X11ApplicationSetFrontProcess();
+
                         /* Get the Spaces preference for SwitchOnActivate */
                         (void)CFPreferencesAppSynchronize(CFSTR("com.apple.dock"));
                         workspaces = CFPreferencesGetAppBooleanValue(CFSTR("workspaces"), CFSTR("com.apple.dock"), &ok);
@@ -370,8 +373,9 @@ static void message_kit_thread (SEL selector, NSObject *arg) {
                          *       If there are no active windows, and there are minimized windows, we should
                          *       be restoring one of them.
                          */
-                        if ([e data2] & 0x10) // 0x10 is set when we use cmd-tab or the dock icon
+                        if ([e data2] & 0x10) { // 0x10 (bfCPSOrderAllWindowsForward) is set when we use cmd-tab or the dock icon
                             DarwinSendDDXEvent(kXquartzBringAllToFront, 1, order_all_windows);
+                        }
                     }
                     break;
                     
@@ -381,7 +385,10 @@ static void message_kit_thread (SEL selector, NSObject *arg) {
                     
                 case NSApplicationDeactivatedEventType:
                     for_x = NO;
-                    [self activateX:NO];
+
+                    x_was_active = _x_active;
+                    if(_x_active)
+                        [self activateX:NO];
                     break;
             }
             break;


More information about the xorg-commit mailing list