xserver: Branch 'server-1.9-branch' - 4 commits
Jeremy Huddleston
jeremyhu at kemper.freedesktop.org
Sat Dec 4 11:24:38 PST 2010
configure.ac | 4 +--
hw/xquartz/mach-startup/bundle-main.c | 2 -
hw/xquartz/quartz.c | 37 ++++++++++++++++++++++++++++++++++
hw/xquartz/quartzRandR.c | 23 +++++++++++----------
os/log.c | 2 -
5 files changed, 54 insertions(+), 14 deletions(-)
New commits:
commit 07b114eb9c6b47b22b4edf17684bdcf5aa89f42d
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date: Fri Dec 3 21:56:54 2010 -0800
Version bumped to 1.9.2.902 (1.9.3 RC2)
Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
diff --git a/configure.ac b/configure.ac
index df40e28..d6a9c65 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,8 +26,8 @@ dnl
dnl Process this file with autoconf to create configure.
AC_PREREQ(2.57)
-AC_INIT([xorg-server], 1.9.2.901, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
-RELEASE_DATE="2010-11-13"
+AC_INIT([xorg-server], 1.9.2.902, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
+RELEASE_DATE="2010-12-03"
AC_CONFIG_SRCDIR([Makefile.am])
AM_INIT_AUTOMAKE([foreign dist-bzip2])
AM_MAINTAINER_MODE
commit 47d474ee8fb29758ec61c128d000f760dd040be4
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date: Fri Dec 3 17:27:44 2010 -0800
XQuartz: RandR: Fix mode changing for multi-monitor configurations.
This just fixes the regression whereby we couldn't switch between the legacy
fullscreen mode and rootless on multi-monitor configurations. This was
happening because ref wasn't being set in these cases (since we don't ever
actually change CG modes), so we failed a CFEqual. Setting the references
fixes this regression and places us one step closer to more mode RandR
mode switching in multi-monitor configurations.
Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
(cherry picked from commit 714b68d9e5bf624a6703f168e0f7dc980e88e8c0)
diff --git a/hw/xquartz/quartzRandR.c b/hw/xquartz/quartzRandR.c
index 298ec0a..296f9b6 100644
--- a/hw/xquartz/quartzRandR.c
+++ b/hw/xquartz/quartzRandR.c
@@ -438,18 +438,16 @@ static Bool QuartzRandRSetConfig (ScreenPtr pScreen,
static Bool _QuartzRandRUpdateFakeModes (ScreenPtr pScreen) {
QuartzScreenPtr pQuartzScreen = QUARTZ_PRIV(pScreen);
- if (pQuartzScreen->displayCount == 1) {
- if(pQuartzScreen->fullscreenMode.ref)
- CFRelease(pQuartzScreen->fullscreenMode.ref);
- if(pQuartzScreen->currentMode.ref)
- CFRelease(pQuartzScreen->currentMode.ref);
+ if(pQuartzScreen->fullscreenMode.ref)
+ CFRelease(pQuartzScreen->fullscreenMode.ref);
+ if(pQuartzScreen->currentMode.ref)
+ CFRelease(pQuartzScreen->currentMode.ref);
- if (!QuartzRandRCopyCurrentModeInfo(pQuartzScreen->displayIDs[0],
- &pQuartzScreen->fullscreenMode))
- return FALSE;
+ if (!QuartzRandRCopyCurrentModeInfo(pQuartzScreen->displayIDs[0],
+ &pQuartzScreen->fullscreenMode))
+ return FALSE;
- CFRetain(pQuartzScreen->fullscreenMode.ref); /* This extra retain is for currentMode's copy */
- } else {
+ if (pQuartzScreen->displayCount > 1) {
pQuartzScreen->fullscreenMode.width = pScreen->width;
pQuartzScreen->fullscreenMode.height = pScreen->height;
if(XQuartzIsRootless)
@@ -467,6 +465,11 @@ static Bool _QuartzRandRUpdateFakeModes (ScreenPtr pScreen) {
} else {
pQuartzScreen->currentMode = pQuartzScreen->fullscreenMode;
}
+
+ /* This extra retain is for currentMode's copy.
+ * fullscreen and rootless share a retain.
+ */
+ CFRetain(pQuartzScreen->currentMode.ref);
DEBUG_LOG("rootlessMode: %d x %d\n", (int)pQuartzScreen->rootlessMode.width, (int)pQuartzScreen->rootlessMode.height);
DEBUG_LOG("fullscreenMode: %d x %d\n", (int)pQuartzScreen->fullscreenMode.width, (int)pQuartzScreen->fullscreenMode.height);
commit 4c3aaef3ffa4a22c951331ef36c45b95f719a907
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>
(cherry picked from commit 14f00449eb81771c01fffcdaf3dd697cdf4e41de)
diff --git a/hw/xquartz/mach-startup/bundle-main.c b/hw/xquartz/mach-startup/bundle-main.c
index 6f7bbfd..498d6b7 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 ee4b45f..053033a 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 438dd53e4b39a465e98c270c7c9baf71e701a821
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>
(cherry picked from commit ca431371a23a2b9ad36c1d64e11ea41d5e4e5f04)
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;
More information about the xorg-commit
mailing list