xserver: Branch 'master' - 2 commits
Jeremy Huddleston
jeremyhu at kemper.freedesktop.org
Sun Nov 8 20:26:03 PST 2009
hw/xquartz/X11Controller.h | 4 ++++
hw/xquartz/pbproxy/app-main.m | 4 ++++
hw/xquartz/pbproxy/main.m | 16 ++++++++++++++++
3 files changed, 24 insertions(+)
New commits:
commit f4377afcf002be89632cbb0700f4d8e4ad7db45c
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date: Sun Nov 8 20:25:42 2009 -0800
XQuartz: Buildfix for Leopard and older
diff --git a/hw/xquartz/X11Controller.h b/hw/xquartz/X11Controller.h
index bb28447..9e16f75 100644
--- a/hw/xquartz/X11Controller.h
+++ b/hw/xquartz/X11Controller.h
@@ -55,7 +55,11 @@ typedef unsigned int NSUInteger;
#endif
#endif
+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
@interface X11Controller : NSObject <NSTableViewDataSource>
+#else
+ at interface X11Controller : NSObject
+#endif
{
IBOutlet NSPanel *prefs_panel;
commit eac45743ede12f8cc3683eaf7f0f6c5c4baa0d55
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date: Tue Oct 27 17:16:57 2009 -0700
XQuartz: pbproxy: Wait for the server to finish starting up, so display is valid.
diff --git a/hw/xquartz/pbproxy/app-main.m b/hw/xquartz/pbproxy/app-main.m
index d4b43c6..f3f683a 100644
--- a/hw/xquartz/pbproxy/app-main.m
+++ b/hw/xquartz/pbproxy/app-main.m
@@ -37,7 +37,11 @@
static const char *app_prefs_domain = "org.x.X11";
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;
static void signal_handler (int sig) {
switch(sig) {
diff --git a/hw/xquartz/pbproxy/main.m b/hw/xquartz/pbproxy/main.m
index 5bc5182..d26b1b1 100644
--- a/hw/xquartz/pbproxy/main.m
+++ b/hw/xquartz/pbproxy/main.m
@@ -47,6 +47,20 @@ BOOL xpbproxy_is_standalone = NO;
x_selection *_selection_object;
+extern BOOL serverInitComplete;
+extern pthread_mutex_t serverInitCompleteMutex;
+extern pthread_cond_t serverInitCompleteCond;
+
+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);
+ }
+}
+
static int x_io_error_handler (Display *dpy) {
/* We lost our connection to the server. */
@@ -85,6 +99,8 @@ static void *xpbproxy_x_thread(void *args) {
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
size_t i;
+ wait_for_server_init();
+
for(i=0, xpbproxy_dpy=NULL; !xpbproxy_dpy && i<5; i++) {
xpbproxy_dpy = XOpenDisplay(NULL);
More information about the xorg-commit
mailing list