xserver: Branch 'master' - 2 commits

Ben Byer bbyer at kemper.freedesktop.org
Sun Nov 4 05:13:26 PST 2007


 hw/darwin/apple/X11.icns                    |binary
 hw/darwin/apple/X11Application.h            |    2 +-
 hw/darwin/apple/X11Application.m            |    3 ++-
 hw/darwin/apple/X11Controller.m             |   20 +++++---------------
 hw/darwin/quartz/xpr/xprCursor.c            |   13 ++++++++++---
 hw/darwin/quartz/xpr/xprFrame.c             |    5 ++---
 hw/darwin/quartz/xpr/xprScreen.c            |   23 ++++++++++++++---------
 miext/rootless/safeAlpha/safeAlphaPicture.c |    2 +-
 8 files changed, 35 insertions(+), 33 deletions(-)

New commits:
commit ff9929ed48f2dec8b536d348e25e66a0bc4ac1a6
Author: Ben Byer <bbyer at bbyer.local>
Date:   Sun Nov 4 05:13:19 2007 -0800

    pulling in changes from xorg-server-1.2-apple branch

diff --git a/hw/darwin/apple/X11.icns b/hw/darwin/apple/X11.icns
index 4c47177..d770e61 100644
Binary files a/hw/darwin/apple/X11.icns and b/hw/darwin/apple/X11.icns differ
diff --git a/hw/darwin/apple/X11Application.h b/hw/darwin/apple/X11Application.h
index eb205a1..8615657 100644
--- a/hw/darwin/apple/X11Application.h
+++ b/hw/darwin/apple/X11Application.h
@@ -79,7 +79,7 @@ extern void X11ApplicationMain (int argc, const char *argv[],
 extern int X11EnableKeyEquivalents;
 extern int quartzHasRoot, quartzEnableRootless;
 
-#define APP_PREFS "org.x.x11"
+#define APP_PREFS "org.x.X11"
 
 #define PREFS_APPSMENU		"apps_menu"
 #define PREFS_FAKEBUTTONS	"enable_fake_buttons"
diff --git a/hw/darwin/apple/X11Application.m b/hw/darwin/apple/X11Application.m
index 41cf425..6b235ad 100644
--- a/hw/darwin/apple/X11Application.m
+++ b/hw/darwin/apple/X11Application.m
@@ -45,7 +45,7 @@
 #include <unistd.h>
 #include <pthread.h>
 
-#define DEFAULTS_FILE "/usr/X11/lib/X11xserver/Xquartz.plist"
+#define DEFAULTS_FILE "/usr/X11/lib/X11/xserver/Xquartz.plist"
 
 int X11EnableKeyEquivalents = TRUE;
 int quartzHasRoot = FALSE, quartzEnableRootless = TRUE;
@@ -311,6 +311,7 @@ static void message_kit_thread (SEL selector, NSObject *arg) {
     [NSApp activateIgnoringOtherApps:YES];
 	
     if ([self modalWindow] == nil) [self activateX:YES];
+    QuartzMessageServerThread(kXDarwinBringAllToFront, 0);
 }
 
 - (void) set_can_quit:(NSNumber *)state {
diff --git a/hw/darwin/apple/X11Controller.m b/hw/darwin/apple/X11Controller.m
index acac313..fbc9c74 100644
--- a/hw/darwin/apple/X11Controller.m
+++ b/hw/darwin/apple/X11Controller.m
@@ -1,5 +1,4 @@
 /* X11Controller.m -- connect the IB ui, also the NSApp delegate
-   $Id: X11Controller.m,v 1.40 2006/09/06 21:19:32 jharper Exp $
  
    Copyright (c) 2002-2007 Apple Inc. All rights reserved.
  
@@ -294,26 +293,17 @@
 - (void) launch_client:(NSString *)filename
 {
   const char *command = [filename UTF8String];
-  const char *shell;
-  const char *argv[5];
+  const char *argv[7];
   int child1, child2 = 0;
   int status;
 	
-  /*  this old code doesn't work with csh ...
-  shell = getenv("SHELL");
-  if (shell == NULL) shell = "/bin/bash";
-    
-  argv[0] = shell;
-  argv[1] = "-l";
-  argv[2] = "-c";
-  argv[3] = command;
-  argv[4] = NULL; 
-  ... but the new code doesn't work with spaces in a command :(
-  */
-  
   argv[0] = "/usr/bin/login";
   argv[1] = "-fp";
   argv[2] = getlogin();
+  argv[3] = "/bin/sh";
+  argv[4] = "-c";
+  argv[5] = command;
+  argv[6] = NULL;
 
   /* Do the fork-twice trick to avoid having to reap zombies */
     
diff --git a/hw/darwin/quartz/xpr/xprCursor.c b/hw/darwin/quartz/xpr/xprCursor.c
index d5a1180..10d3264 100644
--- a/hw/darwin/quartz/xpr/xprCursor.c
+++ b/hw/darwin/quartz/xpr/xprCursor.c
@@ -2,8 +2,6 @@
  *
  * Xplugin cursor support
  *
- **************************************************************/
-/*
  * Copyright (c) 2001 Torrey T. Lyons and Greg Parker.
  * Copyright (c) 2002 Apple Computer, Inc.
  *                 All Rights Reserved.
@@ -84,8 +82,17 @@ load_cursor(CursorPtr src, int screen)
 #ifdef ARGB_CURSOR
     if (src->bits->argb != NULL)
     {
-        rowbytes = src->bits->width * sizeof(CARD32);
+#if BITMAP_BIT_ORDER == MSBFirst
+        rowbytes = src->bits->width * sizeof (CARD32);
         data = (uint32_t *) src->bits->argb;
+#else
+        const uint32_t *be_data=(uint32_t *) src->bits->argb;
+        unsigned i;
+        rowbytes = src->bits->width * sizeof (CARD32);
+        data=alloca (rowbytes * src->bits->height);
+        for(i=0;i<(src->bits->width*src->bits->height);i++)
+            data[i]=ntohl(be_data[i]);
+#endif
     }
     else
 #endif
diff --git a/hw/darwin/quartz/xpr/xprFrame.c b/hw/darwin/quartz/xpr/xprFrame.c
index 76c719e..c395f07 100644
--- a/hw/darwin/quartz/xpr/xprFrame.c
+++ b/hw/darwin/quartz/xpr/xprFrame.c
@@ -1,7 +1,6 @@
 /*
  * Xplugin rootless implementation frame functions
- */
-/*
+ *
  * Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
  * Copyright (c) 2003 Torrey T. Lyons. All Rights Reserved.
  *
@@ -411,7 +410,7 @@ xprInit(ScreenPtr pScreen)
  * Given the id of a physical window, try to find the top-level (or root)
  * X window that it represents.
  */
-static WindowPtr
+WindowPtr
 xprGetXWindow(xp_window_id wid)
 {
     RootlessWindowRec *winRec;
diff --git a/hw/darwin/quartz/xpr/xprScreen.c b/hw/darwin/quartz/xpr/xprScreen.c
index b0ddece..3f91980 100644
--- a/hw/darwin/quartz/xpr/xprScreen.c
+++ b/hw/darwin/quartz/xpr/xprScreen.c
@@ -1,7 +1,6 @@
 /*
  * Xplugin rootless implementation screen functions
- */
-/*
+ *
  * Copyright (c) 2002 Apple Computer, Inc. All Rights Reserved.
  * Copyright (c) 2004 Torrey T. Lyons. All Rights Reserved.
  *
@@ -77,8 +76,14 @@ eventHandler(unsigned int type, const void *arg,
         if (arg_size == sizeof(xp_window_id))
         {
             xp_window_id id = * (xp_window_id *) arg;
-
-            QuartzMessageServerThread(kXDarwinWindowMoved, 1, id);
+	    WindowPtr pWin = xprGetXWindow(id);
+	    BoxRec box;
+	    xp_error retval  = xp_get_window_bounds(id, &box);
+	    if (retval != Success) {
+	      ErrorF("Unable to find new bounds for window\n");
+	      break;
+	    }
+            QuartzMessageServerThread(kXDarwinWindowMoved, 3, pWin, box.x1, box.y1);
         }
         break;
 
@@ -177,15 +182,15 @@ xprAddPseudoramiXScreens(int *x, int *y, int *width, int *height)
 
         frame = displayScreenBounds(dpy);
 
-        ErrorF("PseudoramiX screen %d added: %dx%d @ (%d,%d).\n", i,
+	/*        ErrorF("PseudoramiX screen %d added: %dx%d @ (%d,%d).\n", i,
                (int)frame.size.width, (int)frame.size.height,
-               (int)frame.origin.x, (int)frame.origin.y);
+               (int)frame.origin.x, (int)frame.origin.y); */
 
         frame.origin.x -= unionRect.origin.x;
         frame.origin.y -= unionRect.origin.y;
 
-        ErrorF("PseudoramiX screen %d placed at X11 coordinate (%d,%d).\n",
-               i, (int)frame.origin.x, (int)frame.origin.y);
+	/*        ErrorF("PseudoramiX screen %d placed at X11 coordinate (%d,%d).\n",
+		  i, (int)frame.origin.x, (int)frame.origin.y); */
 
         PseudoramiXAddScreen(frame.origin.x, frame.origin.y,
                              frame.size.width, frame.size.height);
@@ -203,7 +208,7 @@ xprDisplayInit(void)
 {
     CGDisplayCount displayCount;
 
-    ErrorF("Display mode: Rootless Quartz -- Xplugin implementation\n");
+    //    ErrorF("Display mode: Rootless Quartz -- Xplugin implementation\n");
 
     CGGetActiveDisplayList(0, NULL, &displayCount);
 
commit 181468db92d44a58080fc9a76e46dfc7011bf9f1
Author: Ben Byer <bbyer at bbyer.local>
Date:   Sun Nov 4 04:50:26 2007 -0800

    add missing null-pointer checks

diff --git a/miext/rootless/safeAlpha/safeAlphaPicture.c b/miext/rootless/safeAlpha/safeAlphaPicture.c
index 0ed2f3e..57f1ae1 100644
--- a/miext/rootless/safeAlpha/safeAlphaPicture.c
+++ b/miext/rootless/safeAlpha/safeAlphaPicture.c
@@ -167,7 +167,7 @@ SafeAlphaComposite (CARD8           op,
         pDst->format = PICT_a8r8g8b8;
     }
     
-    if (pSrc->pDrawable && pMask->pDrawable &&
+    if (pSrc && pMask && pSrc->pDrawable && pMask->pDrawable &&
 	!pSrc->transform && !pMask->transform &&
 	!pSrc->alphaMap && !pMask->alphaMap &&
 	!pMask->repeat && !pMask->componentAlpha && !pDst->alphaMap &&


More information about the xorg-commit mailing list