xserver: Branch 'xorg-server-1.4-apple' - 2 commits

Jeremy Huddleston jeremyhu at kemper.freedesktop.org
Mon Aug 25 22:11:29 PDT 2008


 configure.ac                          |    2 +-
 hw/xquartz/mach-startup/bundle-main.c |   27 ++++++++++++++++++++++++---
 2 files changed, 25 insertions(+), 4 deletions(-)

New commits:
commit f30a9b33628d060367f23e12c4494e05bc4aa102
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Mon Aug 25 22:11:14 2008 -0700

    1.4.2-apple11

diff --git a/configure.ac b/configure.ac
index 642e470..490fb55 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,7 +26,7 @@ dnl
 dnl Process this file with autoconf to create configure.
 
 AC_PREREQ(2.57)
-AC_INIT([xorg-server], 1.4.2-apple10, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
+AC_INIT([xorg-server], 1.4.2-apple11, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
 AC_CONFIG_SRCDIR([Makefile.am])
 AM_INIT_AUTOMAKE([dist-bzip2 foreign])
 AM_MAINTAINER_MODE
commit 54a882dcbdccef3f3eb4e6398e13c88185a8986c
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Mon Aug 25 22:10:46 2008 -0700

    XQuartz: Made a note to come back to the xinitrc race condition in the 1.5 branch when we move up to it.

diff --git a/hw/xquartz/mach-startup/bundle-main.c b/hw/xquartz/mach-startup/bundle-main.c
index 21a72d9..0eb45d1 100644
--- a/hw/xquartz/mach-startup/bundle-main.c
+++ b/hw/xquartz/mach-startup/bundle-main.c
@@ -41,6 +41,8 @@
 #include <sys/socket.h>
 #include <sys/un.h>
 
+#include <sys/time.h>
+
 #include <mach/mach.h>
 #include <mach/mach_error.h>
 #include <servers/bootstrap.h>
@@ -167,10 +169,29 @@ static void accept_fd_handoff(int connected_fd) {
     }
 
 #ifndef 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... giving xinitrc time to run... need to wait for 1.5 branch:
+     *
+     * From ajax:
+     * There's already an internal callback chain for setting selection [in 1.5]
+     * ownership.  See the CallSelectionCallback at the bottom of
+     * ProcSetSelectionOwner, and xfixes/select.c for an example of how to hook
+     * into it.
+     */
 
-    /* TODO: Clean up this race better... givint xinitrc time to run. */
-    sleep(2);
+#if 0
+    struct timeval start, now;
+    gettimeofday(&start, NULL);
+    gettimeofday(&now, NULL);
+    while((now.tv_sec - start.tv_sec) * 1000000 + (now.tv_usec - start.tv_usec) < 2000000) {
+        unsigned usec = 3000001 - ((now.tv_sec - start.tv_sec) * 1000000 + (now.tv_usec - start.tv_usec));
+        fprintf(stderr, "X11.app: Received new DISPLAY fd: %d ... sleeping to allow xinitrc to catchup (%u).\n", launchd_fd, usec);
+        usleep(usec);
+        gettimeofday(&now, NULL);
+    }
+#else
+    fprintf(stderr, "X11.app: Received new DISPLAY fd: %d ... sleeping to allow xinitrc to catchup.\n", launchd_fd);
+    sleep(3);
+#endif
 #endif
 
     fprintf(stderr, "X11.app Handing off fd to server thread via DarwinListenOnOpenFD(%d)\n", launchd_fd);


More information about the xorg-commit mailing list