xserver: Branch 'server-1.10-branch' - 4 commits

Jeremy Huddleston jeremyhu at kemper.freedesktop.org
Fri May 20 22:59:52 PDT 2011


 configure.ac                     |    4 ++--
 dix/main.c                       |   25 ++++++++++++++++---------
 hw/xquartz/bundle/Info.plist.cpp |    4 ++--
 hw/xquartz/pbproxy/app-main.m    |    6 +++---
 hw/xquartz/pbproxy/main.m        |   16 ++++++++--------
 hw/xquartz/quartzRandR.c         |   19 +++++++++++--------
 mi/mieq.c                        |   16 ++++++++--------
 7 files changed, 50 insertions(+), 40 deletions(-)

New commits:
commit 1a665a8abd0ce1dbc50a1d889f11d5b74c78539e
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date:   Fri May 20 22:59:27 2011 -0700

    configure.ac: Bump version to 1.10.1.902 (1.10.2 RC2)
    
    Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>

diff --git a/configure.ac b/configure.ac
index 5f85383..3a2120c 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.10.1.901, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
-RELEASE_DATE="2011-05-06"
+AC_INIT([xorg-server], 1.10.1.902, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
+RELEASE_DATE="2011-05-20"
 AC_CONFIG_SRCDIR([Makefile.am])
 AM_INIT_AUTOMAKE([foreign dist-bzip2])
 AM_MAINTAINER_MODE
commit 52e27b446a69b4b196d7e59d4e92aaa073c83dae
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date:   Mon May 16 21:07:13 2011 -0700

    XQuartz: Bump bundle version to 2.6.3
    
    Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>

diff --git a/hw/xquartz/bundle/Info.plist.cpp b/hw/xquartz/bundle/Info.plist.cpp
index 4ecf8e4..8873118 100644
--- a/hw/xquartz/bundle/Info.plist.cpp
+++ b/hw/xquartz/bundle/Info.plist.cpp
@@ -19,9 +19,9 @@
 	<key>CFBundlePackageType</key>
 		<string>APPL</string>
 	<key>CFBundleShortVersionString</key>
-		<string>2.6.2</string>
+		<string>2.6.3</string>
 	<key>CFBundleVersion</key>
-		<string>2.6.2</string>
+		<string>2.6.3</string>
 	<key>CFBundleSignature</key>
 		<string>x11a</string>
 	<key>CSResourcesFileMapped</key>
commit b4cb37d7255746f2ddf0ceb3334fc698cd818410
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date:   Sat May 14 18:33:57 2011 -0700

    XQuartz: RandR: Avoid over-releasing if we are unable to determine the current display mode.
    
    Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
    (cherry picked from commit 384eb45b944a4386eae74a5503423c13b5f2a659)

diff --git a/hw/xquartz/quartzRandR.c b/hw/xquartz/quartzRandR.c
index 05641a6..d452b02 100644
--- a/hw/xquartz/quartzRandR.c
+++ b/hw/xquartz/quartzRandR.c
@@ -444,26 +444,29 @@ static Bool QuartzRandRSetConfig (ScreenPtr           pScreen,
 
 static Bool _QuartzRandRUpdateFakeModes (ScreenPtr pScreen) {
     QuartzScreenPtr pQuartzScreen = QUARTZ_PRIV(pScreen);
+    QuartzModeInfo activeMode;
+
+    if (!QuartzRandRCopyCurrentModeInfo(pQuartzScreen->displayIDs[0], &activeMode)) {
+        ErrorF("Unable to determine current display mode.\n");
+        return FALSE;
+    }
 
     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 (pQuartzScreen->displayCount > 1) {
-        pQuartzScreen->fullscreenMode.width = pScreen->width;
-        pQuartzScreen->fullscreenMode.height = pScreen->height;
+        activeMode.width = pScreen->width;
+        activeMode.height = pScreen->height;
         if(XQuartzIsRootless)
-            pQuartzScreen->fullscreenMode.height += aquaMenuBarHeight;
+            activeMode.height += aquaMenuBarHeight;
     }
 
+    pQuartzScreen->fullscreenMode = activeMode; 
     pQuartzScreen->fullscreenMode.refresh = FAKE_REFRESH_FULLSCREEN;
 
-    pQuartzScreen->rootlessMode = pQuartzScreen->fullscreenMode;
+    pQuartzScreen->rootlessMode = activeMode;
     pQuartzScreen->rootlessMode.refresh = FAKE_REFRESH_ROOTLESS;
     pQuartzScreen->rootlessMode.height -= aquaMenuBarHeight;
 
commit 69e3527e257af2aae82449bf0e0e7846ccd1ce0c
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date:   Sat May 14 16:11:32 2011 -0700

    XQuartz: Don't call mieqEnqueue during server shutdown
    
    Found-by: GuardMalloc
    Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
    (cherry picked from commit 25191648b8db87735a99243697f73036255c1eb6)

diff --git a/dix/main.c b/dix/main.c
index 692bec1..e20ffd6 100644
--- a/dix/main.c
+++ b/dix/main.c
@@ -120,9 +120,9 @@ extern void Dispatch(void);
 #ifdef XQUARTZ
 #include <pthread.h>
 
-BOOL serverInitComplete = FALSE;
-pthread_mutex_t serverInitCompleteMutex = PTHREAD_MUTEX_INITIALIZER;
-pthread_cond_t serverInitCompleteCond = PTHREAD_COND_INITIALIZER;
+BOOL serverRunning = FALSE;
+pthread_mutex_t serverRunningMutex = PTHREAD_MUTEX_INITIALIZER;
+pthread_cond_t serverRunningCond = PTHREAD_COND_INITIALIZER;
 
 int dix_main(int argc, char *argv[], char *envp[]);
 
@@ -275,18 +275,25 @@ int main(int argc, char *argv[], char *envp[])
 	}
 
 #ifdef XQUARTZ
-    /* Let the other threads know the server is done with its init */
-    pthread_mutex_lock(&serverInitCompleteMutex);
-    serverInitComplete = TRUE;
-    pthread_cond_broadcast(&serverInitCompleteCond);
-    pthread_mutex_unlock(&serverInitCompleteMutex);
+	/* Let the other threads know the server is done with its init */
+	pthread_mutex_lock(&serverRunningMutex);
+	serverRunning = TRUE;
+	pthread_cond_broadcast(&serverRunningCond);
+	pthread_mutex_unlock(&serverRunningMutex);
 #endif
         
 	NotifyParentProcess();
 
 	Dispatch();
 
-        UndisplayDevices();
+#ifdef XQUARTZ
+	/* Let the other threads know the server is no longer running */
+	pthread_mutex_lock(&serverRunningMutex);
+	serverRunning = FALSE;
+	pthread_mutex_unlock(&serverRunningMutex);
+#endif
+
+	UndisplayDevices();
 
 	/* Now free up whatever must be freed */
 	if (screenIsSaved == SCREEN_SAVER_ON)
diff --git a/hw/xquartz/pbproxy/app-main.m b/hw/xquartz/pbproxy/app-main.m
index b00e90a..0e85101 100644
--- a/hw/xquartz/pbproxy/app-main.m
+++ b/hw/xquartz/pbproxy/app-main.m
@@ -39,9 +39,9 @@ CFStringRef app_prefs_domain_cfstr;
 
 /* Stubs */
 char *display = NULL;
-BOOL serverInitComplete = YES;
-pthread_mutex_t serverInitCompleteMutex = PTHREAD_MUTEX_INITIALIZER;
-pthread_cond_t serverInitCompleteCond = PTHREAD_COND_INITIALIZER;
+BOOL serverRunning = YES;
+pthread_mutex_t serverRunningMutex = PTHREAD_MUTEX_INITIALIZER;
+pthread_cond_t serverRunningCond = PTHREAD_COND_INITIALIZER;
 
 static void signal_handler (int sig) {
     switch(sig) {
diff --git a/hw/xquartz/pbproxy/main.m b/hw/xquartz/pbproxy/main.m
index bb06465..f300c37 100644
--- a/hw/xquartz/pbproxy/main.m
+++ b/hw/xquartz/pbproxy/main.m
@@ -47,17 +47,17 @@ BOOL xpbproxy_is_standalone = NO;
 
 x_selection *_selection_object;
 
-extern BOOL serverInitComplete;
-extern pthread_mutex_t serverInitCompleteMutex;
-extern pthread_cond_t serverInitCompleteCond;
+extern BOOL serverRunning;
+extern pthread_mutex_t serverRunningMutex;
+extern pthread_cond_t serverRunningCond;
 
 static inline void wait_for_server_init(void) {
     /* If the server hasn't finished initializing, wait for it... */
-    if(!serverInitComplete) {
-        pthread_mutex_lock(&serverInitCompleteMutex);
-        while(!serverInitComplete)
-            pthread_cond_wait(&serverInitCompleteCond, &serverInitCompleteMutex);
-        pthread_mutex_unlock(&serverInitCompleteMutex);
+    if(!serverRunning) {
+        pthread_mutex_lock(&serverRunningMutex);
+        while(!serverRunning)
+            pthread_cond_wait(&serverRunningCond, &serverRunningMutex);
+        pthread_mutex_unlock(&serverRunningMutex);
     }
 }
 
diff --git a/mi/mieq.c b/mi/mieq.c
index 01da52a..cd1e47f 100644
--- a/mi/mieq.c
+++ b/mi/mieq.c
@@ -83,17 +83,17 @@ static EventQueueRec miEventQueue;
 #include  <pthread.h>
 static pthread_mutex_t miEventQueueMutex = PTHREAD_MUTEX_INITIALIZER;
 
-extern BOOL serverInitComplete;
-extern pthread_mutex_t serverInitCompleteMutex;
-extern pthread_cond_t serverInitCompleteCond;
+extern BOOL serverRunning;
+extern pthread_mutex_t serverRunningMutex;
+extern pthread_cond_t serverRunningCond;
 
 static inline void wait_for_server_init(void) {
     /* If the server hasn't finished initializing, wait for it... */
-    if(!serverInitComplete) {
-        pthread_mutex_lock(&serverInitCompleteMutex);
-        while(!serverInitComplete)
-            pthread_cond_wait(&serverInitCompleteCond, &serverInitCompleteMutex);
-        pthread_mutex_unlock(&serverInitCompleteMutex);
+    if(!serverRunning) {
+        pthread_mutex_lock(&serverRunningMutex);
+        while(!serverRunning)
+            pthread_cond_wait(&serverRunningCond, &serverRunningMutex);
+        pthread_mutex_unlock(&serverRunningMutex);
     }
 }
 #endif


More information about the xorg-commit mailing list