summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Huddleston Sequoia <jeremyhu@apple.com>2016-09-18 23:17:19 -0700
committerJeremy Huddleston Sequoia <jeremyhu@apple.com>2016-09-22 14:55:02 -0700
commit8bc4727f475321a8adcbbd859f3f8dd9eeb64aa4 (patch)
tree41609c5fc77b14d3c20cdf312766071c0128b661
parent81493d30981d7deb38f57bca2a35487add5ea509 (diff)
XQuartz: pbproxy shouldn't need to wait for server initialization.
Just block on the socket like every other client does. Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-rw-r--r--hw/xquartz/pbproxy/app-main.m3
-rw-r--r--hw/xquartz/pbproxy/main.m18
2 files changed, 0 insertions, 21 deletions
diff --git a/hw/xquartz/pbproxy/app-main.m b/hw/xquartz/pbproxy/app-main.m
index 37b578223..eda9a9e67 100644
--- a/hw/xquartz/pbproxy/app-main.m
+++ b/hw/xquartz/pbproxy/app-main.m
@@ -40,9 +40,6 @@ CFStringRef app_prefs_domain_cfstr;
/* Stubs */
char *display = NULL;
-BOOL serverRunning = YES;
-pthread_mutex_t serverRunningMutex = PTHREAD_MUTEX_INITIALIZER;
-pthread_cond_t serverRunningCond = PTHREAD_COND_INITIALIZER;
static void
signal_handler(int sig)
diff --git a/hw/xquartz/pbproxy/main.m b/hw/xquartz/pbproxy/main.m
index abedb0839..2d2f76108 100644
--- a/hw/xquartz/pbproxy/main.m
+++ b/hw/xquartz/pbproxy/main.m
@@ -48,22 +48,6 @@ BOOL xpbproxy_is_standalone = NO;
x_selection *_selection_object;
-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 (!serverRunning) {
- pthread_mutex_lock(&serverRunningMutex);
- while (!serverRunning)
- pthread_cond_wait(&serverRunningCond, &serverRunningMutex);
- pthread_mutex_unlock(&serverRunningMutex);
- }
-}
-
static int
x_io_error_handler(Display *dpy)
{
@@ -97,8 +81,6 @@ xpbproxy_run(void)
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);