[Xquartz-changes] xserver: Branch 'master' - 4 commits

Jeremy Huddleston jeremyhu at freedesktop.org
Tue Jun 28 09:27:16 PDT 2011


Rebased ref, commits from common ancestor:
commit 4a36b38cb78d25f11e3c1d7705a7499979327be0
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 a796e9a67e502833bfadfc67e196b736ab987570
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 a53ab50..b0faa6a 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 a97a3fd8b2d2e595857702a6f21e48a377797c19
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;
commit 4dbed2625431a92e20bede7b8cef847b5d5d99ba
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Mon Jun 27 14:45:18 2011 +1000

    xfree86: Only log the serial bytes if debug is on.
    
    Introduced in e3f296d91dfe6b827195e1d387e1a04aa73b85c3, when the ifdef DEBUG
    around the whole block was removed, but only two of the three ErrorF
    switched to DebugF.
    
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
    Signed-off-by: Keith Packard <keithp at keithp.com>

diff --git a/hw/xfree86/os-support/shared/posix_tty.c b/hw/xfree86/os-support/shared/posix_tty.c
index 1a33070..fb83860 100644
--- a/hw/xfree86/os-support/shared/posix_tty.c
+++ b/hw/xfree86/os-support/shared/posix_tty.c
@@ -404,7 +404,7 @@ xf86WriteSerial (int fd, const void *buf, int count)
 
 	DebugF("WritingSerial: 0x%x",(unsigned char)*(((unsigned char *)buf)));
 	for (i = 1; i < count; i++)
-	    ErrorF(", 0x%x",(unsigned char)*(((unsigned char *)buf) + i));
+	    DebugF(", 0x%x",(unsigned char)*(((unsigned char *)buf) + i));
 	DebugF("\n");
 	SYSCALL (r = write (fd, buf, count));
 	return r;


More information about the Xquartz-changes mailing list