XQuartz: Purge the old XQUARTZ_EXPORTS_LAUNCHD_FD option
(cherry picked from commit 490756c7fbe0792c4bd6ae434e7a48e0beffa5c7)
This commit is contained in:
parent
0a076b6a7f
commit
93d7cd31c5
|
@ -266,16 +266,9 @@ static void DarwinEventHandler(int screenNum, xEventPtr xe, DeviceIntPtr dev, in
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef XQUARTZ_EXPORTS_LAUNCHD_FD
|
|
||||||
int xquartz_launchd_fd = -1;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void DarwinListenOnOpenFD(int fd) {
|
void DarwinListenOnOpenFD(int fd) {
|
||||||
ErrorF("DarwinListenOnOpenFD: %d\n", fd);
|
ErrorF("DarwinListenOnOpenFD: %d\n", fd);
|
||||||
|
|
||||||
#ifdef XQUARTZ_EXPORTS_LAUNCHD_FD
|
|
||||||
xquartz_launchd_fd = fd;
|
|
||||||
#else
|
|
||||||
pthread_mutex_lock(&fd_add_lock);
|
pthread_mutex_lock(&fd_add_lock);
|
||||||
if(fd_add_count < FD_ADD_MAX)
|
if(fd_add_count < FD_ADD_MAX)
|
||||||
fd_add[fd_add_count++] = fd;
|
fd_add[fd_add_count++] = fd;
|
||||||
|
@ -284,7 +277,6 @@ void DarwinListenOnOpenFD(int fd) {
|
||||||
|
|
||||||
pthread_cond_broadcast(&fd_add_ready_cond);
|
pthread_cond_broadcast(&fd_add_ready_cond);
|
||||||
pthread_mutex_unlock(&fd_add_lock);
|
pthread_mutex_unlock(&fd_add_lock);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void DarwinProcessFDAdditionQueue_thread(void *args) {
|
static void DarwinProcessFDAdditionQueue_thread(void *args) {
|
||||||
|
|
|
@ -213,7 +213,6 @@ static void socket_handoff_thread(void *arg) {
|
||||||
unlink(handoff_data->filename);
|
unlink(handoff_data->filename);
|
||||||
free(handoff_data);
|
free(handoff_data);
|
||||||
|
|
||||||
#ifndef XQUARTZ_EXPORTS_LAUNCHD_FD
|
|
||||||
/* TODO: Clean up this race better... giving xinitrc time to run... need to wait for 1.5 branch:
|
/* TODO: Clean up this race better... giving xinitrc time to run... need to wait for 1.5 branch:
|
||||||
*
|
*
|
||||||
* From ajax:
|
* From ajax:
|
||||||
|
@ -226,7 +225,6 @@ static void socket_handoff_thread(void *arg) {
|
||||||
unsigned remain = 3000000;
|
unsigned remain = 3000000;
|
||||||
fprintf(stderr, "X11.app: Received new $DISPLAY fd: %d ... sleeping to allow xinitrc to catchup.\n", launchd_fd);
|
fprintf(stderr, "X11.app: Received new $DISPLAY fd: %d ... sleeping to allow xinitrc to catchup.\n", launchd_fd);
|
||||||
while((remain = usleep(remain)) > 0);
|
while((remain = usleep(remain)) > 0);
|
||||||
#endif
|
|
||||||
|
|
||||||
fprintf(stderr, "X11.app Handing off fd to server thread via DarwinListenOnOpenFD(%d)\n", launchd_fd);
|
fprintf(stderr, "X11.app Handing off fd to server thread via DarwinListenOnOpenFD(%d)\n", launchd_fd);
|
||||||
DarwinListenOnOpenFD(launchd_fd);
|
DarwinListenOnOpenFD(launchd_fd);
|
||||||
|
@ -398,13 +396,6 @@ int startup_trigger(int argc, char **argv, char **envp) {
|
||||||
/* Could open the display, start the launcher */
|
/* Could open the display, start the launcher */
|
||||||
XCloseDisplay(display);
|
XCloseDisplay(display);
|
||||||
|
|
||||||
#ifdef XQUARTZ_EXPORTS_LAUNCHD_FD
|
|
||||||
fprintf(stderr, "X11.app: Received new DISPLAY fd: %d ... sleeping to allow xinitrc to catchup.\n", launchd_fd);
|
|
||||||
|
|
||||||
/* TODO: Clean up this race better... givint xinitrc time to run. */
|
|
||||||
sleep(2);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return execute(command_from_prefs("app_to_run", DEFAULT_CLIENT));
|
return execute(command_from_prefs("app_to_run", DEFAULT_CLIENT));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue