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

Jeremy Huddleston jeremyhu at kemper.freedesktop.org
Fri Dec 14 15:25:50 PST 2007


 dix/dixfonts.c                  |    4 ++--
 hw/xquartz/Makefile.am          |    2 +-
 hw/xquartz/bundle/Makefile.am   |    2 +-
 hw/xquartz/bundle/bundle-main.c |    2 +-
 hw/xquartz/x11-exec.c           |   24 +++++++++++++++++-------
 5 files changed, 22 insertions(+), 12 deletions(-)

New commits:
commit b709718a6983dbd0d3badcde60be271d0d7aff52
Author: Ben Byer <bbyer at bbyer.apple.com>
Date:   Thu Dec 13 20:46:33 2007 -0800

    Silence FPE error message; according to ajax, this bug is known
    but not worth fixing.
    (cherry picked from commit 1033eb03368701dc4a52f40a737341b2931ab986)

diff --git a/dix/dixfonts.c b/dix/dixfonts.c
index c21b3ec..e7c349d 100644
--- a/dix/dixfonts.c
+++ b/dix/dixfonts.c
@@ -1628,9 +1628,9 @@ FreeFontPath(FontPathElementPtr *list, int n, Bool force)
 		    found++;
 	    }
 	    if (list[i]->refcount != found) {
-		ErrorF("FreeFontPath: FPE \"%.*s\" refcount is %d, should be %d; fixing.\n",
+      /*		ErrorF("FreeFontPath: FPE \"%.*s\" refcount is %d, should be %d; fixing.\n",
 		       list[i]->name_length, list[i]->name,
-		       list[i]->refcount, found);
+		       list[i]->refcount, found); */
 		list[i]->refcount = found; /* ensure it will get freed */
 	    }
 	}
commit 16c032a602f404d09e028608457222171bc17d61
Author: Ben Byer <bbyer at bbyer.apple.com>
Date:   Thu Dec 13 20:45:14 2007 -0800

    clarified debug message to indicate that we're sleeping
    (in case we get reports about slow launch times, this will
    help clarify what's happening)
    (cherry picked from commit 2eea3483cf893f8f81bacd434b31408dfb38cb06)

diff --git a/hw/xquartz/bundle/bundle-main.c b/hw/xquartz/bundle/bundle-main.c
index 53f60a3..681e1a8 100644
--- a/hw/xquartz/bundle/bundle-main.c
+++ b/hw/xquartz/bundle/bundle-main.c
@@ -52,7 +52,7 @@ int main(int argc, char **argv) {
         /* Now, try to open a display, if so, run the launcher */
         display = XOpenDisplay(NULL);
         if(display) {
-            fprintf(stderr, "X11.app: main(): closing the display");
+            fprintf(stderr, "X11.app: main(): closing the display and sleeping");
             /* Could open the display, start the launcher */
             XCloseDisplay(display);
             
commit 4346e6b5dd7d51efab01f6a6fc4d6ba180661c91
Author: Ben Byer <bbyer at bbyer.apple.com>
Date:   Thu Dec 13 20:44:33 2007 -0800

    we need to link against CoreServices, not ApplicationServices
    (cherry picked from commit ba4d2096e7953ef5b971682f0e28535da968acb1)

diff --git a/hw/xquartz/Makefile.am b/hw/xquartz/Makefile.am
index b40a4f5..69a5c91 100644
--- a/hw/xquartz/Makefile.am
+++ b/hw/xquartz/Makefile.am
@@ -12,7 +12,7 @@ X11APP_SUBDIRS = bundle
 
 if LAUNCHD
 libexec_PROGRAMS = x11-exec
-x11_exec_LDFLAGS = -framework ApplicationServices
+x11_exec_LDFLAGS = -framework CoreServices
 endif
 
 endif
commit 077d54c6892d24d4d5f7359d7af800e19d610fd7
Author: Ben Byer <bbyer at bbyer.apple.com>
Date:   Thu Dec 13 20:40:27 2007 -0800

    fixed bug in x11-exec that prevent icon from showing up
    (cherry picked from commit e1f4a0c20d3a52d98954c4b28d0ec4d44564bc32)

diff --git a/hw/xquartz/x11-exec.c b/hw/xquartz/x11-exec.c
index d0b5c49..105fd72 100644
--- a/hw/xquartz/x11-exec.c
+++ b/hw/xquartz/x11-exec.c
@@ -28,7 +28,7 @@
  promote the sale, use or other dealings in this Software without
  prior written authorization. */
 
-#include <ApplicationServices/ApplicationServices.h>
+#include <CoreServices/CoreServices.h>
 #include <stdio.h>
 
 #define kX11AppBundleId "org.x.X11"
@@ -36,10 +36,10 @@
 
 int main(int argc, char **argv) {
   char x11_path[PATH_MAX];
+  char** args = NULL;
   CFURLRef appURL = NULL;
-  OSStatus osstatus = 
-    LSFindApplicationForInfo(kLSUnknownCreator, CFSTR(kX11AppBundleId), 
-			     nil, nil, &appURL);
+  OSStatus osstatus = LSFindApplicationForInfo(kLSUnknownCreator, CFSTR(kX11AppBundleId), 
+					       nil, nil, &appURL);
   
   switch (osstatus) {
   case noErr:
@@ -52,10 +52,20 @@ int main(int argc, char **argv) {
       fprintf(stderr, "%s: Error resolving URL for %s\n", argv[0], kX11AppBundleId);
       exit(2);
     }
-    strlcpy(argv[0], "X11", strlen(argv[0])+1);
+    
+    args = (char**)malloc(sizeof (char*) * (argc + 1));
     strlcat(x11_path, kX11AppBundlePath, sizeof(x11_path));
-//  fprintf(stderr, "X11.app = %s\n", x11_path);
-    execv(x11_path, argv);
+    if (args) {
+      int i;
+      args[0] = x11_path;
+      for (i = 1; i < argc; ++i) {
+        args[i] = argv[i];
+      }
+      args[i] = NULL;
+    }
+    
+    fprintf(stderr, "X11.app = %s\n", x11_path);
+    execv(x11_path, args);
     fprintf(stderr, "Error executing X11.app (%s):", x11_path);
     perror(NULL);
     exit(3);
commit fcb97a55a096009f1ce552b1c27e9dfcf85b2ce2
Author: Jeremy Huddleston <jeremy at yuffie.local>
Date:   Fri Dec 14 15:21:40 2007 -0800

    Xquartz: Fixed cpprules include
    (cherry picked from commit 95c02adea80a14e18bb51876bc1418eccdade31d)

diff --git a/hw/xquartz/bundle/Makefile.am b/hw/xquartz/bundle/Makefile.am
index 775e1aa..da297e9 100644
--- a/hw/xquartz/bundle/Makefile.am
+++ b/hw/xquartz/bundle/Makefile.am
@@ -15,9 +15,9 @@ launchagents_DATA = $(launchagents_PRE:plist.pre=plist)
 CPP_FILES_FLAGS = -D__libexecdir__="${libexecdir}"
 
 CLEANFILES = $(launchagents_DATA)
+endif
 
 include $(top_srcdir)/cpprules.in
-endif
 
 clean-local:
 	rm -rf build


More information about the xorg-commit mailing list