diff options
author | marha <marha@users.sourceforge.net> | 2010-04-02 12:30:48 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2010-04-02 12:30:48 +0000 |
commit | 1d59691fe77c20ecb010ea8589a940c4ea6ac356 (patch) | |
tree | d1ee8df3981303c35e46905c9df26203bb232973 /xorg-server/hw/xquartz/X11Application.m | |
parent | 0be07f8b067afad77df8cac086b43f6d213fbe20 (diff) | |
download | vcxsrv-1d59691fe77c20ecb010ea8589a940c4ea6ac356.tar.gz vcxsrv-1d59691fe77c20ecb010ea8589a940c4ea6ac356.tar.bz2 vcxsrv-1d59691fe77c20ecb010ea8589a940c4ea6ac356.zip |
Updated to following packages:
pixman-0.18.0
xorg-server-1.8.0
Diffstat (limited to 'xorg-server/hw/xquartz/X11Application.m')
-rw-r--r-- | xorg-server/hw/xquartz/X11Application.m | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/xorg-server/hw/xquartz/X11Application.m b/xorg-server/hw/xquartz/X11Application.m index 3faa1cb84..54066404e 100644 --- a/xorg-server/hw/xquartz/X11Application.m +++ b/xorg-server/hw/xquartz/X11Application.m @@ -52,7 +52,7 @@ #include <Xplugin.h> // pbproxy/pbproxy.h -extern BOOL xpbproxy_init (void); +extern int xpbproxy_run (void); #define DEFAULTS_FILE X11LIBDIR"/X11/xserver/Xquartz.plist" @@ -908,6 +908,26 @@ environment the next time you start X11?", @"Startup xinitrc dialog"); [X11App prefs_synchronize]; } +static inline pthread_t create_thread(void *func, void *arg) { + pthread_attr_t attr; + pthread_t tid; + + pthread_attr_init(&attr); + pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM); + pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); + pthread_create(&tid, &attr, func, arg); + pthread_attr_destroy(&attr); + + return tid; +} + +static void *xpbproxy_x_thread(void *args) { + xpbproxy_run(); + + fprintf(stderr, "xpbproxy thread is terminating unexpectedly.\n"); + return NULL; +} + void X11ApplicationMain (int argc, char **argv, char **envp) { NSAutoreleasePool *pool; @@ -962,8 +982,7 @@ void X11ApplicationMain (int argc, char **argv, char **envp) { */ check_xinitrc(); - if(!xpbproxy_init()) - fprintf(stderr, "Error initializing xpbproxy\n"); + create_thread(xpbproxy_x_thread, NULL); #if XQUARTZ_SPARKLE [[X11App controller] setup_sparkle]; |