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

Jeremy Huddleston jeremyhu at freedesktop.org
Fri Dec 3 16:47:21 PST 2010


Rebased ref, commits from common ancestor:
commit 14f00449eb81771c01fffcdaf3dd697cdf4e41de
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date:   Fri Dec 3 16:46:11 2010 -0800

    XQuartz: Cleanup some compiler warnings
    
    Mark __crashreporter_info__ as __attribute__((__used__))
    
    Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>

diff --git a/hw/xquartz/mach-startup/bundle-main.c b/hw/xquartz/mach-startup/bundle-main.c
index 7ac5469..75b3939 100644
--- a/hw/xquartz/mach-startup/bundle-main.c
+++ b/hw/xquartz/mach-startup/bundle-main.c
@@ -74,7 +74,7 @@ extern int noPanoramiXExtension;
 #endif
 
 static char __crashreporter_info_buff__[4096] = {0};
-static const char *__crashreporter_info__ = &__crashreporter_info_buff__[0];
+static const char *__crashreporter_info__ __attribute__((__used__)) = &__crashreporter_info_buff__[0];
 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1050
 // This is actually a toolchain requirement, but I'm not sure the correct check,
 // but it should be fine to just only include it for Leopard and later.  This line
diff --git a/os/log.c b/os/log.c
index d77708e..be4462f 100644
--- a/os/log.c
+++ b/os/log.c
@@ -121,7 +121,7 @@ static Bool needBuffer = TRUE;
 #include <AvailabilityMacros.h>
 
 static char __crashreporter_info_buff__[4096] = {0};
-static const char *__crashreporter_info__ = &__crashreporter_info_buff__[0];
+static const char *__crashreporter_info__ __attribute__((__used__)) = &__crashreporter_info_buff__[0];
 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1050
 // This is actually a toolchain requirement, but I'm not sure the correct check,        
 // but it should be fine to just only include it for Leopard and later.  This line
commit 14aec8b82a316c6df51ac2a81985ebf1990abd2b
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date:   Fri Dec 3 16:45:37 2010 -0800

    XQuartz: Remove one more backing store leftover
    
    See: c4c4676e6874b42c2371eee96faa2c2dbb59a704
    
    Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>

diff --git a/hw/xquartz/darwin.c b/hw/xquartz/darwin.c
index c8eade8..93697a9 100644
--- a/hw/xquartz/darwin.c
+++ b/hw/xquartz/darwin.c
@@ -792,7 +792,7 @@ xf86SetRootClip (ScreenPtr pScreen, int enable)
     WindowPtr	pChild;
     Bool	WasViewable = (Bool)(pWin->viewable);
     Bool	anyMarked = TRUE;
-    RegionPtr	pOldClip = NULL, bsExposed;
+    RegionPtr	pOldClip = NULL;
     WindowPtr   pLayerWin;
     BoxRec	box;
 
commit ca431371a23a2b9ad36c1d64e11ea41d5e4e5f04
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date:   Fri Nov 26 15:31:22 2010 -0500

    XQuartz: Disable the Mac OS X screensaver when in full screen mode
    
    Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>

diff --git a/hw/xquartz/quartz.c b/hw/xquartz/quartz.c
index e21303c..26b2c1f 100644
--- a/hw/xquartz/quartz.c
+++ b/hw/xquartz/quartz.c
@@ -62,6 +62,7 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <IOKit/pwr_mgt/IOPMLib.h>
+#include <pthread.h>
 
 #include <rootlessCommon.h>
 #include <Xplugin.h>
@@ -246,6 +247,40 @@ void QuartzUpdateScreens(void) {
     quartzProcs->UpdateScreen(pScreen);
 }
 
+static void pokeActivityCallback(CFRunLoopTimerRef timer, void *info) {
+    UpdateSystemActivity(OverallAct);
+}
+
+static void QuartzScreenSaver(int state) {
+    static CFRunLoopTimerRef pokeActivityTimer = NULL;
+    static CFRunLoopTimerContext pokeActivityContext = { 0, NULL, NULL, NULL, NULL };
+    static pthread_mutex_t pokeActivityMutex = PTHREAD_MUTEX_INITIALIZER;
+
+    pthread_mutex_lock(&pokeActivityMutex);
+    
+    if(state) {
+        if(pokeActivityTimer == NULL)
+            goto QuartzScreenSaverEnd;
+
+        CFRunLoopTimerInvalidate(pokeActivityTimer);
+        CFRelease(pokeActivityTimer);
+        pokeActivityTimer = NULL;
+    } else {
+        if(pokeActivityTimer != NULL)
+            goto QuartzScreenSaverEnd;
+        
+        pokeActivityTimer = CFRunLoopTimerCreate(NULL, CFAbsoluteTimeGetCurrent(), 30, 0, 0, pokeActivityCallback, &pokeActivityContext);
+        if(pokeActivityTimer == NULL) {
+            ErrorF("Unable to create pokeActivityTimer.\n");
+            goto QuartzScreenSaverEnd;
+        }
+
+        CFRunLoopAddTimer(CFRunLoopGetMain(), pokeActivityTimer, kCFRunLoopCommonModes);
+    }
+QuartzScreenSaverEnd:
+    pthread_mutex_unlock(&pokeActivityMutex);
+}
+
 void QuartzShowFullscreen(int state) {
     int i;
     
@@ -256,6 +291,8 @@ void QuartzShowFullscreen(int state) {
         return;
     }
     
+    QuartzScreenSaver(!state);
+    
     if(XQuartzFullscreenVisible == state)
         return;
     
commit 311cad33155c64ed996418808727fc417168592e
Author: Nicolas Peninguy <nico at lostgeeks.org>
Date:   Wed Nov 24 00:11:11 2010 +0100

    Fix Xdmx and Xephyr build when DTrace support is enabled
    
    This fixes the following build errors when DTrace is enabled
    (--with-dtrace):
    
      CCLD   Xdmx
    /usr/bin/ld: ../../os/os.O: undefined reference to symbol 'dladdr@@GLIBC_2.2.5'
    /usr/bin/ld: note: 'dladdr@@GLIBC_2.2.5' is defined in DSO /lib64/libdl.so.2 so try adding it to the linker command line
    
      CCLD   Xephyr
    ../../../os/os.O: In function `TimerForce':
    /home/nico/work/xserver/os/WaitFor.c:481: multiple definition of `TimerForce'
    ../../../os/os.O:/home/nico/work/xserver/os/WaitFor.c:481: first defined here
    
    Signed-off-by: Nicolas Peninguy <nico at lostgeeks.org>
    Reviewed-by: Alan Coopersmith <alan.coopersmith at oracle.com>
    Signed-off-by: Keith Packard <keithp at keithp.com>

diff --git a/configure.ac b/configure.ac
index 2363e38..a80a13f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1335,7 +1335,7 @@ AC_DEFINE(BIGREQS, 1, [Support BigRequests extension])
 
 if test "x$SPECIAL_DTRACE_OBJECTS" = "xyes" ; then
   DIX_LIB='$(top_builddir)/dix/dix.O'
-  OS_LIB='$(top_builddir)/os/os.O $(SHA1_LIBS)'
+  OS_LIB='$(top_builddir)/os/os.O $(SHA1_LIBS) $(DLOPEN_LIBS)'
 else
   DIX_LIB='$(top_builddir)/dix/libdix.la'
   OS_LIB='$(top_builddir)/os/libos.la'
@@ -2122,7 +2122,7 @@ if test "$KDRIVE" = yes; then
     KDRIVE_STUB_LIB='$(top_builddir)/hw/kdrive/src/libkdrivestubs.la'
     KDRIVE_LOCAL_LIBS="$MAIN_LIB $DIX_LIB $KDRIVE_LIB $KDRIVE_STUB_LIB"
     KDRIVE_LOCAL_LIBS="$KDRIVE_LOCAL_LIBS $FB_LIB $MI_LIB $KDRIVE_PURE_LIBS"
-    KDRIVE_LOCAL_LIBS="$KDRIVE_LOCAL_LIBS $KDRIVE_OS_LIB $OS_LIB"
+    KDRIVE_LOCAL_LIBS="$KDRIVE_LOCAL_LIBS $KDRIVE_OS_LIB"
     KDRIVE_LIBS="$KDRIVE_LOCAL_LIBS $XSERVER_SYS_LIBS $GLX_SYS_LIBS $DLOPEN_LIBS $TSLIB_LIBS"
 
     AC_SUBST([XEPHYR_LIBS])


More information about the Xquartz-changes mailing list