xserver: Branch 'xorg-server-1.2-apple' - 4 commits

Ben Byer bbyer at kemper.freedesktop.org
Thu Dec 13 20:46:45 PST 2007


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

New commits:
commit 1033eb03368701dc4a52f40a737341b2931ab986
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.

diff --git a/dix/dixfonts.c b/dix/dixfonts.c
index f10011e..02b6be6 100644
--- a/dix/dixfonts.c
+++ b/dix/dixfonts.c
@@ -1632,9 +1632,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 2eea3483cf893f8f81bacd434b31408dfb38cb06
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)

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 ba4d2096e7953ef5b971682f0e28535da968acb1
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

diff --git a/hw/xquartz/Makefile.am b/hw/xquartz/Makefile.am
index 3f86467..0694605 100644
--- a/hw/xquartz/Makefile.am
+++ b/hw/xquartz/Makefile.am
@@ -13,7 +13,7 @@ X11APP_SUBDIRS = bundle
 
 if LAUNCHD
 libexec_PROGRAMS = x11-exec
-x11_exec_LDFLAGS = -framework ApplicationServices
+x11_exec_LDFLAGS = -framework CoreServices
 endif
 
 endif
commit e1f4a0c20d3a52d98954c4b28d0ec4d44564bc32
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

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);


More information about the xorg-commit mailing list