[70185] trunk/dports/x11/xorg-server

jeremyhu at macports.org jeremyhu at macports.org
Sat Jul 31 14:51:16 PDT 2010


Revision: 70185
          http://trac.macports.org/changeset/70185
Author:   jeremyhu at macports.org
Date:     2010-07-31 14:51:12 -0700 (Sat, 31 Jul 2010)
Log Message:
-----------
xorg-server: Pull in patches from my git tree to address stability and match what will be shipped in 2.5.3

Modified Paths:
--------------
    trunk/dports/x11/xorg-server/Portfile
    trunk/dports/x11/xorg-server/files/0001-OS-support-fix-writeable-client-vs-IgnoreClient-beha.patch
    trunk/dports/x11/xorg-server/files/0002-dixstruct-make-ignoreCount-change-more-ABI-friendly.patch
    trunk/dports/x11/xorg-server/files/0003-XQuartz-Avoid-a-crash-when-mistakenly-free-ing-in-Qu.patch

Added Paths:
-----------
    trunk/dports/x11/xorg-server/files/0004-rootless-Adjust-the-frame-size-of-the-native-root-wi.patch
    trunk/dports/x11/xorg-server/files/0005-XQuartz-Bump-bundle-version-to-2.5.2.patch
    trunk/dports/x11/xorg-server/files/0006-XQuartz-GL-Fix-__glXAquaScreenCreateDrawable-prototy.patch
    trunk/dports/x11/xorg-server/files/0007-XQuartz-GLX-Don-t-mangle-__GLXDrawable-s-pDraw.patch
    trunk/dports/x11/xorg-server/files/0008-XQuartz-xpbproxy-Don-t-take-down-the-whole-server-on.patch
    trunk/dports/x11/xorg-server/files/0009-XQuartz-Bump-bundle-version-to-2.5.3.patch
    trunk/dports/x11/xorg-server/files/0010-Workaround-the-GC-clipping-problem-in-miPaintWindow-.patch
    trunk/dports/x11/xorg-server/files/0011-fb-Revert-fb-changes-that-broke-XQuartz.patch

Removed Paths:
-------------
    trunk/dports/x11/xorg-server/files/0004-Workaround-the-GC-clipping-problem-in-miPaintWindow-.patch
    trunk/dports/x11/xorg-server/files/0005-fb-Revert-fb-changes-that-broke-XQuartz.patch

Modified: trunk/dports/x11/xorg-server/Portfile
===================================================================
--- trunk/dports/x11/xorg-server/Portfile	2010-07-31 21:35:39 UTC (rev 70184)
+++ trunk/dports/x11/xorg-server/Portfile	2010-07-31 21:51:12 UTC (rev 70185)
@@ -87,8 +87,14 @@
         0001-OS-support-fix-writeable-client-vs-IgnoreClient-beha.patch \
         0002-dixstruct-make-ignoreCount-change-more-ABI-friendly.patch \
         0003-XQuartz-Avoid-a-crash-when-mistakenly-free-ing-in-Qu.patch \
-        0004-Workaround-the-GC-clipping-problem-in-miPaintWindow-.patch \
-        0005-fb-Revert-fb-changes-that-broke-XQuartz.patch
+        0004-rootless-Adjust-the-frame-size-of-the-native-root-wi.patch \
+        0005-XQuartz-Bump-bundle-version-to-2.5.2.patch \
+        0006-XQuartz-GL-Fix-__glXAquaScreenCreateDrawable-prototy.patch \
+        0007-XQuartz-GLX-Don-t-mangle-__GLXDrawable-s-pDraw.patch \
+        0008-XQuartz-xpbproxy-Don-t-take-down-the-whole-server-on.patch \
+        0009-XQuartz-Bump-bundle-version-to-2.5.3.patch \
+        0010-Workaround-the-GC-clipping-problem-in-miPaintWindow-.patch \
+        0011-fb-Revert-fb-changes-that-broke-XQuartz.patch
 
 patch.pre_args -p1
 

Modified: trunk/dports/x11/xorg-server/files/0001-OS-support-fix-writeable-client-vs-IgnoreClient-beha.patch
===================================================================
--- trunk/dports/x11/xorg-server/files/0001-OS-support-fix-writeable-client-vs-IgnoreClient-beha.patch	2010-07-31 21:35:39 UTC (rev 70184)
+++ trunk/dports/x11/xorg-server/files/0001-OS-support-fix-writeable-client-vs-IgnoreClient-beha.patch	2010-07-31 21:51:12 UTC (rev 70185)
@@ -1,7 +1,7 @@
 From 665aa7ce8645b50b888db32ebab4e192dbe00649 Mon Sep 17 00:00:00 2001
 From: Jesse Barnes <jbarnes at virtuousgeek.org>
 Date: Wed, 30 Jun 2010 07:59:04 -0700
-Subject: [PATCH 1/5] OS support: fix writeable client vs IgnoreClient behavior
+Subject: [PATCH 01/11] OS support: fix writeable client vs IgnoreClient behavior
 
 When ResetCurrentRequest is called, or IgnoreClient is called when a
 client has input pending, IgnoredClientsWithInput will be set.  However,
@@ -64,5 +64,5 @@
  	FD_ISSET(connection, &GrabImperviousClients))
      {
 -- 
-1.7.1.1
+1.7.2.1
 

Modified: trunk/dports/x11/xorg-server/files/0002-dixstruct-make-ignoreCount-change-more-ABI-friendly.patch
===================================================================
--- trunk/dports/x11/xorg-server/files/0002-dixstruct-make-ignoreCount-change-more-ABI-friendly.patch	2010-07-31 21:35:39 UTC (rev 70184)
+++ trunk/dports/x11/xorg-server/files/0002-dixstruct-make-ignoreCount-change-more-ABI-friendly.patch	2010-07-31 21:51:12 UTC (rev 70185)
@@ -1,7 +1,7 @@
 From 090d26723f7cdbb3aebfe212170b7f81c163dd7b Mon Sep 17 00:00:00 2001
 From: Jesse Barnes <jbarnes at virtuousgeek.org>
 Date: Thu, 8 Jul 2010 09:08:51 -0700
-Subject: [PATCH 2/5] dixstruct: make ignoreCount change more ABI friendly
+Subject: [PATCH 02/11] dixstruct: make ignoreCount change more ABI friendly
 
 Move ignoreCount to the bottom of the ClientRec where it should have
 less impact on the ABI.
@@ -32,5 +32,5 @@
  
  /*
 -- 
-1.7.1.1
+1.7.2.1
 

Modified: trunk/dports/x11/xorg-server/files/0003-XQuartz-Avoid-a-crash-when-mistakenly-free-ing-in-Qu.patch
===================================================================
--- trunk/dports/x11/xorg-server/files/0003-XQuartz-Avoid-a-crash-when-mistakenly-free-ing-in-Qu.patch	2010-07-31 21:35:39 UTC (rev 70184)
+++ trunk/dports/x11/xorg-server/files/0003-XQuartz-Avoid-a-crash-when-mistakenly-free-ing-in-Qu.patch	2010-07-31 21:51:12 UTC (rev 70185)
@@ -1,7 +1,7 @@
 From 9168c63e275767c728afe7b2bba8bc391aceeeb8 Mon Sep 17 00:00:00 2001
 From: Jeremy Huddleston <jeremyhu at apple.com>
 Date: Tue, 13 Jul 2010 08:25:27 -0700
-Subject: [PATCH 3/5] XQuartz: Avoid a crash when mistakenly free()ing in QuartzSetCursor on some configs
+Subject: [PATCH 03/11] XQuartz: Avoid a crash when mistakenly free()ing in QuartzSetCursor on some configs
 
 Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
 (cherry picked from commit 648d189548530fa23d97d1e8737f89d297f1c443)
@@ -48,5 +48,5 @@
  }
  
 -- 
-1.7.1.1
+1.7.2.1
 

Deleted: trunk/dports/x11/xorg-server/files/0004-Workaround-the-GC-clipping-problem-in-miPaintWindow-.patch
===================================================================
--- trunk/dports/x11/xorg-server/files/0004-Workaround-the-GC-clipping-problem-in-miPaintWindow-.patch	2010-07-31 21:35:39 UTC (rev 70184)
+++ trunk/dports/x11/xorg-server/files/0004-Workaround-the-GC-clipping-problem-in-miPaintWindow-.patch	2010-07-31 21:51:12 UTC (rev 70185)
@@ -1,165 +0,0 @@
-From d65f52ef67251c36258205a2df0191b9ed329a9c Mon Sep 17 00:00:00 2001
-From: Jeremy Huddleston <jeremyhu at apple.com>
-Date: Fri, 30 Apr 2010 13:08:25 -0700
-Subject: [PATCH 4/5] Workaround the GC clipping problem in miPaintWindow and add some debugging output.
-
-Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
-(cherry picked from commit a9c526bbe10ecf97b6c065fdbc03cc341917a5a6)
----
- mi/miexpose.c |  105 +++++++++++++++++++++++++++++++++++++++++++++++++++------
- 1 files changed, 94 insertions(+), 11 deletions(-)
-
-diff --git xorg-server-1.8.2/mi/miexpose.c xorg-server-1.8.2/mi/miexpose.c
-index f52b492..21493cb 100644
---- xorg-server-1.8.2/mi/miexpose.c
-+++ xorg-server-1.8.2/mi/miexpose.c
-@@ -524,6 +524,7 @@ void RootlessSetPixmapOfAncestors(WindowPtr pWin);
- void RootlessStartDrawing(WindowPtr pWin);
- void RootlessDamageRegion(WindowPtr pWin, RegionPtr prgn);
- Bool IsFramedWindow(WindowPtr pWin);
-+#include "../fb/fb.h"
- #endif 
- 
- void
-@@ -551,24 +552,37 @@ miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what)
-     Bool	solid = TRUE;
-     DrawablePtr	drawable = &pWin->drawable;
- 
-+#ifdef XQUARTZ_CLIP_DEBUG
-+    ErrorF("START %d BS %d (pR = %ld)\n", what, pWin->backgroundState, ParentRelative);
-+    ErrorF("      Rgn: %d %d %d %d\n", prgn->extents.x1, prgn->extents.y1,
-+	                               prgn->extents.x2 - prgn->extents.x1,
-+	                               prgn->extents.y2 - prgn->extents.y1);
-+    ErrorF("      Win: %d %d (%d %d) %d %d\n", pWin->origin.x, pWin->origin.y,
-+	                                       pWin->winSize.extents.x1, pWin->winSize.extents.y1,
-+	                                       pWin->winSize.extents.x2 - pWin->winSize.extents.x1,
-+					       pWin->winSize.extents.y2 - pWin->winSize.extents.y1);
-+    ErrorF("     Draw: %d %d %d %d\n", pWin->drawable.x, pWin->drawable.y,
-+				       pWin->drawable.width, pWin->drawable.height);
-+#endif
-+
- #ifdef ROOTLESS
-     if(!drawable || drawable->type == UNDRAWABLE_WINDOW)
- 	return;
--
--    if(IsFramedWindow(pWin)) {
--        RootlessStartDrawing(pWin);
--        RootlessDamageRegion(pWin, prgn);
--    
--        if(pWin->backgroundState == ParentRelative) {
--            if((what == PW_BACKGROUND) || 
--               (what == PW_BORDER && !pWin->borderIsPixel))
--                RootlessSetPixmapOfAncestors(pWin);
--        }
--    }
- #endif
-     
-     if (what == PW_BACKGROUND)
-     {
-+#ifdef ROOTLESS
-+	if(IsFramedWindow(pWin)) {
-+	    RootlessStartDrawing(pWin);
-+	    RootlessDamageRegion(pWin, prgn);
-+
-+	    if(pWin->backgroundState == ParentRelative) {
-+		RootlessSetPixmapOfAncestors(pWin);
-+	    }
-+	}
-+#endif
-+
- 	while (pWin->backgroundState == ParentRelative)
- 	    pWin = pWin->parent;
- 
-@@ -590,6 +604,18 @@ miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what)
-     {
- 	PixmapPtr   pixmap;
- 
-+#ifdef ROOTLESS
-+	if(IsFramedWindow(pWin)) {
-+	    RootlessStartDrawing(pWin);
-+	    RootlessDamageRegion(pWin, prgn);
-+	    
-+	    if(!pWin->borderIsPixel &&
-+		pWin->backgroundState == ParentRelative) {
-+		RootlessSetPixmapOfAncestors(pWin);
-+	    }
-+	}
-+#endif
-+
- 	tile_x_off = drawable->x;
- 	tile_y_off = drawable->y;
- 	
-@@ -598,6 +624,12 @@ miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what)
- 	    return;
- 	pixmap = (*pScreen->GetWindowPixmap) ((WindowPtr) drawable);
- 	drawable = &pixmap->drawable;
-+
-+#ifdef XQUARTZ_CLIP_DEBUG
-+	ErrorF("     Draw: %d %d %d %d\n",
-+	       drawable->x, drawable->y, drawable->width, drawable->height);    
-+#endif
-+	
- #ifdef COMPOSITE
- 	draw_x_off = pixmap->screen_x;
- 	draw_y_off = pixmap->screen_y;
-@@ -660,6 +692,57 @@ miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what)
-     dixChangeGC (NullClient, pGC, gcmask, NULL, gcval);
-     ValidateGC (drawable, pGC);
- 
-+#ifdef XQUARTZ_CLIP_DEBUG
-+    ErrorF("       GC: %d %d %d %d\n",
-+	   pGC->pCompositeClip->extents.x1, pGC->pCompositeClip->extents.y1,
-+	   pGC->pCompositeClip->extents.x2 - pGC->pCompositeClip->extents.x1,
-+	   pGC->pCompositeClip->extents.y2 - pGC->pCompositeClip->extents.y1);
-+#endif
-+    
-+#ifdef XQUARTZ
-+    /* Looks like our clipping isn't set right for some reason:
-+     * http://xquartz.macosforge.org/trac/ticket/290
-+     */
-+    if(what == PW_BORDER) {
-+
-+#if 0
-+	if(solid) {
-+#if 1
-+	    fbFillRegionSolid(&pWin->drawable,
-+			      prgn,
-+			      0,
-+			      fbReplicatePixel(fill.pixel,
-+					       pWin->drawable.bitsPerPixel));
-+#else
-+	    fbFillRegionSolid(drawable,
-+			      prgn,
-+			      0,
-+			      fbReplicatePixel(fill.pixel,
-+					       drawable->bitsPerPixel));
-+#endif
-+	    return;
-+	}
-+#endif
-+    
-+	pGC->pCompositeClip->extents.x1 += prgn->extents.x1;
-+	pGC->pCompositeClip->extents.y1 += prgn->extents.y1;
-+	pGC->pCompositeClip->extents.x2 += prgn->extents.x1;
-+	pGC->pCompositeClip->extents.y2 += prgn->extents.y1;
-+	
-+	if(pGC->pCompositeClip->extents.x2 > drawable->pScreen->width)
-+	    pGC->pCompositeClip->extents.x2 = drawable->pScreen->width;
-+	if(pGC->pCompositeClip->extents.y2 > drawable->pScreen->height)
-+	    pGC->pCompositeClip->extents.y2 = drawable->pScreen->height;
-+    }
-+#endif
-+
-+#ifdef XQUARTZ_CLIP_DEBUG
-+    ErrorF("       GC: %d %d %d %d\n",
-+	   pGC->pCompositeClip->extents.x1, pGC->pCompositeClip->extents.y1,
-+	   pGC->pCompositeClip->extents.x2 - pGC->pCompositeClip->extents.x1,
-+	   pGC->pCompositeClip->extents.y2 - pGC->pCompositeClip->extents.y1);    
-+#endif
-+
-     numRects = REGION_NUM_RECTS(prgn);
-     pbox = REGION_RECTS(prgn);
-     for (i= numRects; --i >= 0; pbox++, prect++)
--- 
-1.7.1.1
-

Added: trunk/dports/x11/xorg-server/files/0004-rootless-Adjust-the-frame-size-of-the-native-root-wi.patch
===================================================================
--- trunk/dports/x11/xorg-server/files/0004-rootless-Adjust-the-frame-size-of-the-native-root-wi.patch	                        (rev 0)
+++ trunk/dports/x11/xorg-server/files/0004-rootless-Adjust-the-frame-size-of-the-native-root-wi.patch	2010-07-31 21:51:12 UTC (rev 70185)
@@ -0,0 +1,60 @@
+From ea191e1679f91373da439b5a90cae756aff837c2 Mon Sep 17 00:00:00 2001
+From: Jan Hauffa <hauffa at in.tum.de>
+Date: Sat, 17 Jul 2010 12:18:39 -0700
+Subject: [PATCH 04/11] rootless: Adjust the frame size of the native root window in RootlessResizeWindow
+
+If the native root window isn't resized as well, we will likely crash the
+next time we draw to the root.  On OS X, this can be seen by:
+
+1) Put the display preferences in the menu bar and set X11's preferences so you
+   can access the menu bar in fullscreen mode
+2) Set the resolution of your screen lower than normal.
+3) Start X11 in fullscreen mode.  The root window will cover the screen as
+   expected.
+4) Use the menu bar to increase the resolution of the display.  The root
+   window will now cover the old area and not the full screen, but
+   'xwininfo -root' will report the full width.
+5) Run 'xsetroot -solid red', and we have the crash you mention above.
+
+Leaving/entering fullscreen after #4 will fix the problem.  This is because the
+WINREC is erased when we leave fullscreen mode and it is recreated upon
+re-entry:
+
+RootlessUpdateRooted(FALSE)
+    RootlessDisableRoot(screenInfo.screens[0])
+        RootlessDestroyFrame (pRoot, winRec);
+RootlessUpdateRooted(TRUE)
+    RootlessEnableRoot(screenInfo.screens[0])
+        RootlessEnsureFrame(screenInfo.screens[0]->pRoot)
+            creates a new WINREC...
+
+Signed-off-by: Jan Hauffa <hauffa at in.tum.de>
+Reviewed-by: Jeremy Huddleston <jeremyhu at apple.com>
+Acked-By: Jon TURNEY <jon.turney at dronecode.org.uk>
+Tested-by: Jeremy Huddleston <jeremyhu at apple.com>
+(cherry picked from commit 95756f410c65a6510a797e94a792b959d45cdb9e)
+---
+ miext/rootless/rootlessWindow.c |    7 +++++++
+ 1 files changed, 7 insertions(+), 0 deletions(-)
+
+diff --git xorg-server-1.8.2/miext/rootless/rootlessWindow.c xorg-server-1.8.2/miext/rootless/rootlessWindow.c
+index 55c7b96..8e3b7af 100644
+--- xorg-server-1.8.2/miext/rootless/rootlessWindow.c
++++ xorg-server-1.8.2/miext/rootless/rootlessWindow.c
+@@ -1326,6 +1326,13 @@ RootlessResizeWindow(WindowPtr pWin, int x, int y,
+         REGION_COPY(pScreen, &pWin->clipList, &pWin->winSize);
+         REGION_COPY(pScreen, &pWin->borderClip, &pWin->winSize);
+ 
++        if (winRec) {
++            SCREENREC(pScreen)->imp->ResizeFrame(winRec->wid, pScreen,
++                                                 x + SCREEN_TO_GLOBAL_X,
++                                                 y + SCREEN_TO_GLOBAL_Y,
++                                                 w, h, RL_GRAVITY_NONE);
++        }
++
+         miSendExposures(pWin, &pWin->borderClip,
+                         pWin->drawable.x, pWin->drawable.y);        
+     }
+-- 
+1.7.2.1
+

Added: trunk/dports/x11/xorg-server/files/0005-XQuartz-Bump-bundle-version-to-2.5.2.patch
===================================================================
--- trunk/dports/x11/xorg-server/files/0005-XQuartz-Bump-bundle-version-to-2.5.2.patch	                        (rev 0)
+++ trunk/dports/x11/xorg-server/files/0005-XQuartz-Bump-bundle-version-to-2.5.2.patch	2010-07-31 21:51:12 UTC (rev 70185)
@@ -0,0 +1,29 @@
+From 5f555ea1a1647795aeb84985f478eed0424dad61 Mon Sep 17 00:00:00 2001
+From: Jeremy Huddleston <jeremyhu at apple.com>
+Date: Tue, 20 Jul 2010 00:37:43 -0700
+Subject: [PATCH 05/11] XQuartz: Bump bundle version to 2.5.2
+
+Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
+---
+ hw/xquartz/bundle/Info.plist.cpp |    4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git xorg-server-1.8.2/hw/xquartz/bundle/Info.plist.cpp xorg-server-1.8.2/hw/xquartz/bundle/Info.plist.cpp
+index 91c8c03..dfc7d9c 100644
+--- xorg-server-1.8.2/hw/xquartz/bundle/Info.plist.cpp
++++ xorg-server-1.8.2/hw/xquartz/bundle/Info.plist.cpp
+@@ -19,9 +19,9 @@
+ 	<key>CFBundlePackageType</key>
+ 		<string>APPL</string>
+ 	<key>CFBundleShortVersionString</key>
+-		<string>2.5.1</string>
++		<string>2.5.2</string>
+ 	<key>CFBundleVersion</key>
+-		<string>2.5.1</string>
++		<string>2.5.2</string>
+ 	<key>CFBundleSignature</key>
+ 		<string>x11a</string>
+ 	<key>CSResourcesFileMapped</key>
+-- 
+1.7.2.1
+

Deleted: trunk/dports/x11/xorg-server/files/0005-fb-Revert-fb-changes-that-broke-XQuartz.patch
===================================================================
--- trunk/dports/x11/xorg-server/files/0005-fb-Revert-fb-changes-that-broke-XQuartz.patch	2010-07-31 21:35:39 UTC (rev 70184)
+++ trunk/dports/x11/xorg-server/files/0005-fb-Revert-fb-changes-that-broke-XQuartz.patch	2010-07-31 21:51:12 UTC (rev 70185)
@@ -1,231 +0,0 @@
-From 063d4b2d4d895018f128bf58cef6ff7ee82a074e Mon Sep 17 00:00:00 2001
-From: Jeremy Huddleston <jeremyhu at apple.com>
-Date: Fri, 12 Feb 2010 19:48:52 -0800
-Subject: [PATCH 5/5] fb: Revert fb changes that broke XQuartz
-
-http://bugs.freedesktop.org/show_bug.cgi?id=26124
-
-Revert "Fix source pictures getting random transforms after 2d6a8f668342a5190cdf43b5."
-Revert "fb: Adjust transform or composite coordinates for pixman operations"
-
-http://bugs.freedesktop.org/26124
-
-This reverts commit a72c65e9176c51de95db2fdbf4c5d946a4911695.
-This reverts commit a6bd5d2e482a5aa84acb3d4932e2a166d8670ef1.
-
-Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
----
- fb/fb.h     |    7 +----
- fb/fbpict.c |   72 ++++++++++++++++++-----------------------------------------
- fb/fbtrap.c |    6 +---
- 3 files changed, 26 insertions(+), 59 deletions(-)
-
-diff --git xorg-server-1.8.2/fb/fb.h xorg-server-1.8.2/fb/fb.h
-index 02d6c03..ed21f9e 100644
---- xorg-server-1.8.2/fb/fb.h
-+++ xorg-server-1.8.2/fb/fb.h
-@@ -2082,11 +2082,8 @@ fbFillRegionSolid (DrawablePtr	pDrawable,
- 		   FbBits	xor);
- 
- extern _X_EXPORT pixman_image_t *
--image_from_pict (PicturePtr	pict,
--		 Bool		has_clip,
--		 int		*xoff,
--		 int		*yoff);
--
-+image_from_pict (PicturePtr pict,
-+		 Bool       has_clip);
- extern _X_EXPORT void free_pixman_pict (PicturePtr, pixman_image_t *);
- 
- #endif /* _FB_H_ */
-diff --git xorg-server-1.8.2/fb/fbpict.c xorg-server-1.8.2/fb/fbpict.c
-index dddfce8..07a2286 100644
---- xorg-server-1.8.2/fb/fbpict.c
-+++ xorg-server-1.8.2/fb/fbpict.c
-@@ -158,24 +158,19 @@ fbComposite (CARD8      op,
- 	     CARD16     height)
- {
-     pixman_image_t *src, *mask, *dest;
--    int src_xoff, src_yoff;
--    int msk_xoff, msk_yoff;
--    int dst_xoff, dst_yoff;
-     
-     miCompositeSourceValidate (pSrc, xSrc - xDst, ySrc - yDst, width, height);
-     if (pMask)
- 	miCompositeSourceValidate (pMask, xMask - xDst, yMask - yDst, width, height);
-     
--    src = image_from_pict (pSrc, FALSE, &src_xoff, &src_yoff);
--    mask = image_from_pict (pMask, FALSE, &msk_xoff, &msk_yoff);
--    dest = image_from_pict (pDst, TRUE, &dst_xoff, &dst_yoff);
-+    src = image_from_pict (pSrc, TRUE);
-+    mask = image_from_pict (pMask, TRUE);
-+    dest = image_from_pict (pDst, TRUE);
- 
-     if (src && dest && !(pMask && !mask))
-     {
- 	pixman_image_composite (op, src, mask, dest,
--				xSrc + src_xoff, ySrc + src_yoff,
--				xMask + msk_xoff, yMask + msk_yoff,
--				xDst + dst_xoff, yDst + dst_yoff,
-+				xSrc, ySrc, xMask, yMask, xDst, yDst,
- 				width, height);
-     }
- 
-@@ -275,22 +270,22 @@ create_conical_gradient_image (PictGradient *gradient)
- 
- static pixman_image_t *
- create_bits_picture (PicturePtr pict,
--		     Bool       has_clip,
--		     int	*xoff,
--		     int	*yoff)
-+		     Bool       has_clip)
- {
--    PixmapPtr pixmap;
-     FbBits *bits;
-     FbStride stride;
--    int bpp;
-+    int bpp, xoff, yoff;
-     pixman_image_t *image;
-     
--    fbGetDrawablePixmap (pict->pDrawable, pixmap, *xoff, *yoff);
--    fbGetPixmapBitsData(pixmap, bits, stride, bpp);
-+    fbGetDrawable (pict->pDrawable, bits, stride, bpp, xoff, yoff);
-+
-+    bits = (FbBits*)((CARD8*)bits +
-+		     (pict->pDrawable->y + yoff) * stride * sizeof(FbBits) +
-+		     (pict->pDrawable->x + xoff) * (bpp / 8));
- 
-     image = pixman_image_create_bits (
- 	pict->format,
--	pixmap->drawable.width, pixmap->drawable.height,
-+	pict->pDrawable->width, pict->pDrawable->height,
- 	(uint32_t *)bits, stride * sizeof (FbStride));
-     
-     
-@@ -316,52 +311,30 @@ create_bits_picture (PicturePtr pict,
- 	if (pict->clientClipType != CT_NONE)
- 	    pixman_image_set_has_client_clip (image, TRUE);
- 
--	if (*xoff || *yoff)
--	    pixman_region_translate (pict->pCompositeClip, *xoff, *yoff);
-+	pixman_region_translate (pict->pCompositeClip, - pict->pDrawable->x, - pict->pDrawable->y);
- 
- 	pixman_image_set_clip_region (image, pict->pCompositeClip);
- 
--	if (*xoff || *yoff)
--	    pixman_region_translate (pict->pCompositeClip, -*xoff, -*yoff);
-+	pixman_region_translate (pict->pCompositeClip, pict->pDrawable->x, pict->pDrawable->y);
-     }
-     
-     /* Indexed table */
-     if (pict->pFormat->index.devPrivate)
- 	pixman_image_set_indexed (image, pict->pFormat->index.devPrivate);
- 
--    /* Add in drawable origin to position within the image */
--    *xoff += pict->pDrawable->x;
--    *yoff += pict->pDrawable->y;
--
-     return image;
- }
- 
- static void
--set_image_properties (pixman_image_t *image, PicturePtr pict, Bool has_clip, int *xoff, int *yoff)
-+set_image_properties (pixman_image_t *image, PicturePtr pict)
- {
-     pixman_repeat_t repeat;
-     pixman_filter_t filter;
-     
-     if (pict->transform)
-     {
--	/* For source images, adjust the transform to account
--	 * for the drawable offset within the pixman image,
--	 * then set the offset to 0 as it will be used
--	 * to compute positions within the transformed image.
--	 */
--	if (!has_clip) {
--	    struct pixman_transform	adjusted;
--
--	    adjusted = *pict->transform;
--	    pixman_transform_translate(&adjusted,
--				       NULL,
--				       pixman_int_to_fixed(*xoff),
--				       pixman_int_to_fixed(*yoff));
--	    pixman_image_set_transform (image, &adjusted);
--	    *xoff = 0;
--	    *yoff = 0;
--	} else
--	    pixman_image_set_transform (image, pict->transform);
-+	pixman_image_set_transform (
-+	    image, (pixman_transform_t *)pict->transform);
-     }
-     
-     switch (pict->repeatType)
-@@ -388,8 +361,7 @@ set_image_properties (pixman_image_t *image, PicturePtr pict, Bool has_clip, int
-     
-     if (pict->alphaMap)
-     {
--	int alpha_xoff, alpha_yoff;
--	pixman_image_t *alpha_map = image_from_pict (pict->alphaMap, FALSE, &alpha_xoff, &alpha_yoff);
-+	pixman_image_t *alpha_map = image_from_pict (pict->alphaMap, TRUE);
- 	
- 	pixman_image_set_alpha_map (
- 	    image, alpha_map, pict->alphaOrigin.x, pict->alphaOrigin.y);
-@@ -422,7 +394,8 @@ set_image_properties (pixman_image_t *image, PicturePtr pict, Bool has_clip, int
- }
- 
- pixman_image_t *
--image_from_pict (PicturePtr pict, Bool has_clip, int *xoff, int *yoff)
-+image_from_pict (PicturePtr pict,
-+		 Bool has_clip)
- {
-     pixman_image_t *image = NULL;
- 
-@@ -431,7 +404,7 @@ image_from_pict (PicturePtr pict, Bool has_clip, int *xoff, int *yoff)
- 
-     if (pict->pDrawable)
-     {
--	image = create_bits_picture (pict, has_clip, xoff, yoff);
-+	image = create_bits_picture (pict, has_clip);
-     }
-     else if (pict->pSourcePict)
-     {
-@@ -452,11 +425,10 @@ image_from_pict (PicturePtr pict, Bool has_clip, int *xoff, int *yoff)
- 	    else if (sp->type == SourcePictTypeConical)
- 		image = create_conical_gradient_image (gradient);
- 	}
--	*xoff = *yoff = 0;
-     }
-     
-     if (image)
--	set_image_properties (image, pict, has_clip, xoff, yoff);
-+	set_image_properties (image, pict);
-     
-     return image;
- }
-diff --git xorg-server-1.8.2/fb/fbtrap.c xorg-server-1.8.2/fb/fbtrap.c
-index 515e2e1..830603a 100644
---- xorg-server-1.8.2/fb/fbtrap.c
-+++ xorg-server-1.8.2/fb/fbtrap.c
-@@ -40,8 +40,7 @@ fbAddTraps (PicturePtr	pPicture,
- 	    int		ntrap,
- 	    xTrap	*traps)
- {
--    int image_xoff, image_yoff;
--    pixman_image_t *image = image_from_pict (pPicture, FALSE, &image_xoff, &image_yoff);
-+    pixman_image_t *image = image_from_pict (pPicture, FALSE);
- 
-     if (!image)
- 	return;
-@@ -57,8 +56,7 @@ fbRasterizeTrapezoid (PicturePtr    pPicture,
- 		      int	    x_off,
- 		      int	    y_off)
- {
--    int	mask_xoff, mask_yoff;
--    pixman_image_t *image = image_from_pict (pPicture, FALSE, &mask_xoff, &mask_yoff);
-+    pixman_image_t *image = image_from_pict (pPicture, FALSE);
- 
-     if (!image)
- 	return;
--- 
-1.7.1.1
-

Added: trunk/dports/x11/xorg-server/files/0006-XQuartz-GL-Fix-__glXAquaScreenCreateDrawable-prototy.patch
===================================================================
--- trunk/dports/x11/xorg-server/files/0006-XQuartz-GL-Fix-__glXAquaScreenCreateDrawable-prototy.patch	                        (rev 0)
+++ trunk/dports/x11/xorg-server/files/0006-XQuartz-GL-Fix-__glXAquaScreenCreateDrawable-prototy.patch	2010-07-31 21:51:12 UTC (rev 70185)
@@ -0,0 +1,55 @@
+From c7846bf1b2cc78a7181dab3fb712c48c6684a29d Mon Sep 17 00:00:00 2001
+From: Jeremy Huddleston <jeremyhu at apple.com>
+Date: Tue, 11 May 2010 09:49:34 -0700
+Subject: [PATCH 06/11] XQuartz GL: Fix __glXAquaScreenCreateDrawable prototype
+
+Fixes regression introduced in 9de0e31746d5f0d9d39d11c94ec3cbc04a9935fc
+
+Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
+Reviewed-by: Keith Packard <keithp at keithp.com>
+Signed-off-by: Keith Packard <keithp at keithp.com>
+(cherry picked from commit ba1f1f9d9e48226f1ef6b3222a8d92fc969d6560)
+---
+ hw/xquartz/GL/indirect.c |   10 ++++++----
+ 1 files changed, 6 insertions(+), 4 deletions(-)
+
+diff --git xorg-server-1.8.2/hw/xquartz/GL/indirect.c xorg-server-1.8.2/hw/xquartz/GL/indirect.c
+index ad9ebbd..8092cfa 100644
+--- xorg-server-1.8.2/hw/xquartz/GL/indirect.c
++++ xorg-server-1.8.2/hw/xquartz/GL/indirect.c
+@@ -169,7 +169,7 @@ void warn_func(void * p1, char *format, ...);
+ 
+ // some prototypes
+ static __GLXscreen * __glXAquaScreenProbe(ScreenPtr pScreen);
+-static __GLXdrawable * __glXAquaScreenCreateDrawable(__GLXscreen *screen, DrawablePtr pDraw, int type, XID drawId, __GLXconfig *conf);
++static __GLXdrawable * __glXAquaScreenCreateDrawable(ClientPtr client, __GLXscreen *screen, DrawablePtr pDraw, XID drawId, int type, XID glxDrawId, __GLXconfig *conf);
+ 
+ static void __glXAquaContextDestroy(__GLXcontext *baseContext);
+ static int __glXAquaContextMakeCurrent(__GLXcontext *baseContext);
+@@ -639,10 +639,12 @@ static void __glXAquaDrawableDestroy(__GLXdrawable *base) {
+ }
+ 
+ static __GLXdrawable *
+-__glXAquaScreenCreateDrawable(__GLXscreen *screen,
++__glXAquaScreenCreateDrawable(ClientPtr client,
++                              __GLXscreen *screen,
+ 			      DrawablePtr pDraw,
+-			      int type,
+ 			      XID drawId,
++			      int type,
++			      XID glxDrawId,
+ 			      __GLXconfig *conf) {
+   __GLXAquaDrawable *glxPriv;
+ 
+@@ -653,7 +655,7 @@ __glXAquaScreenCreateDrawable(__GLXscreen *screen,
+ 
+   memset(glxPriv, 0, sizeof *glxPriv);
+ 
+-  if(!__glXDrawableInit(&glxPriv->base, screen, pDraw, type, drawId, conf)) {
++  if(!__glXDrawableInit(&glxPriv->base, screen, pDraw, type, glxDrawId, conf)) {
+     xfree(glxPriv);
+     return NULL;
+   }
+-- 
+1.7.2.1
+

Added: trunk/dports/x11/xorg-server/files/0007-XQuartz-GLX-Don-t-mangle-__GLXDrawable-s-pDraw.patch
===================================================================
--- trunk/dports/x11/xorg-server/files/0007-XQuartz-GLX-Don-t-mangle-__GLXDrawable-s-pDraw.patch	                        (rev 0)
+++ trunk/dports/x11/xorg-server/files/0007-XQuartz-GLX-Don-t-mangle-__GLXDrawable-s-pDraw.patch	2010-07-31 21:51:12 UTC (rev 70185)
@@ -0,0 +1,44 @@
+From 5aeb53dd7b5b50eddad01c684f3c8ce122d46f4c Mon Sep 17 00:00:00 2001
+From: Jeremy Huddleston <jeremyhu at apple.com>
+Date: Wed, 28 Jul 2010 18:08:02 -0700
+Subject: [PATCH 07/11] XQuartz: GLX: Don't mangle __GLXDrawable's pDraw
+
+We were incorrectly NULLing out pDraw in __GLXDrawable instead of ours in
+__GLXAquaDrawable. (we should refactor to eliminate this redundancy later)
+
+This was causing http://xquartz.macosforge.org/trac/ticket/426
+This was benign until commit f0006aa58f6cf7552a239e169ff6e7e4fda532f4
+The root cause of this change was  fed7ccc481ad1caaa518cafe944c2327a5d0b6c65
+
+Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
+(cherry picked from commit 98f90145d786695ecbc02a667c6ffe7c619dc67e)
+---
+ hw/xquartz/GL/indirect.c |    5 ++---
+ 1 files changed, 2 insertions(+), 3 deletions(-)
+
+diff --git xorg-server-1.8.2/hw/xquartz/GL/indirect.c xorg-server-1.8.2/hw/xquartz/GL/indirect.c
+index 8092cfa..ed25c3d 100644
+--- xorg-server-1.8.2/hw/xquartz/GL/indirect.c
++++ xorg-server-1.8.2/hw/xquartz/GL/indirect.c
+@@ -271,8 +271,7 @@ static void __glXAquaContextDestroy(__GLXcontext *baseContext) {
+ 
+     __GLXAquaContext *context = (__GLXAquaContext *) baseContext;
+     
+-    GLAQUA_DEBUG_MSG("glAquaContextDestroy (ctx 0x%x)\n",
+-                     (unsigned int) baseContext);
++    GLAQUA_DEBUG_MSG("glAquaContextDestroy (ctx %p)\n", baseContext);
+     if (context != NULL) {
+       if (context->sid != 0 && surface_hash != NULL) {
+ 		lst = x_hash_table_lookup(surface_hash, x_cvt_uint_to_vptr(context->sid), NULL);
+@@ -321,7 +320,7 @@ static void surface_notify(void *_arg, void *data) {
+     case AppleDRISurfaceNotifyDestroyed:
+         if (surface_hash != NULL)
+             x_hash_table_remove(surface_hash, x_cvt_uint_to_vptr(arg->id));
+-	draw->base.pDraw = NULL;
++	draw->pDraw = NULL;
+ 	draw->sid = 0;
+         break;
+ 
+-- 
+1.7.2.1
+

Added: trunk/dports/x11/xorg-server/files/0008-XQuartz-xpbproxy-Don-t-take-down-the-whole-server-on.patch
===================================================================
--- trunk/dports/x11/xorg-server/files/0008-XQuartz-xpbproxy-Don-t-take-down-the-whole-server-on.patch	                        (rev 0)
+++ trunk/dports/x11/xorg-server/files/0008-XQuartz-xpbproxy-Don-t-take-down-the-whole-server-on.patch	2010-07-31 21:51:12 UTC (rev 70185)
@@ -0,0 +1,31 @@
+From a9483196cf2fc8319057541d2bd3c4f3fa0e7357 Mon Sep 17 00:00:00 2001
+From: Jeremy Huddleston <jeremyhu at apple.com>
+Date: Thu, 29 Jul 2010 11:39:40 -0700
+Subject: [PATCH 08/11] XQuartz: xpbproxy: Don't take down the whole server on an IO error
+
+Calls pthread_exit to prevent _XIOError from calling exit()
+
+This fixes http://xquartz.macosforge.org/trac/ticket/421
+
+Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
+(cherry picked from commit 750d4e82a0c1161292d24216bcff200cd6647611)
+---
+ hw/xquartz/pbproxy/main.m |    2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+diff --git xorg-server-1.8.2/hw/xquartz/pbproxy/main.m xorg-server-1.8.2/hw/xquartz/pbproxy/main.m
+index 560cf01..bb06465 100644
+--- xorg-server-1.8.2/hw/xquartz/pbproxy/main.m
++++ xorg-server-1.8.2/hw/xquartz/pbproxy/main.m
+@@ -75,6 +75,8 @@ static int x_io_error_handler (Display *dpy) {
+         exit(EXIT_FAILURE);
+ #endif
+ 
++    /* Prevent _XIOError from calling exit() */
++    pthread_exit(NULL);
+     return 0;
+ }
+ 
+-- 
+1.7.2.1
+

Added: trunk/dports/x11/xorg-server/files/0009-XQuartz-Bump-bundle-version-to-2.5.3.patch
===================================================================
--- trunk/dports/x11/xorg-server/files/0009-XQuartz-Bump-bundle-version-to-2.5.3.patch	                        (rev 0)
+++ trunk/dports/x11/xorg-server/files/0009-XQuartz-Bump-bundle-version-to-2.5.3.patch	2010-07-31 21:51:12 UTC (rev 70185)
@@ -0,0 +1,29 @@
+From 7593290d1e0666a41966f82e3029e3028e46ffec Mon Sep 17 00:00:00 2001
+From: Jeremy Huddleston <jeremyhu at apple.com>
+Date: Sat, 31 Jul 2010 14:48:22 -0700
+Subject: [PATCH 09/11] XQuartz: Bump bundle version to 2.5.3
+ Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
+
+---
+ hw/xquartz/bundle/Info.plist.cpp |    4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git xorg-server-1.8.2/hw/xquartz/bundle/Info.plist.cpp xorg-server-1.8.2/hw/xquartz/bundle/Info.plist.cpp
+index dfc7d9c..9dd012f 100644
+--- xorg-server-1.8.2/hw/xquartz/bundle/Info.plist.cpp
++++ xorg-server-1.8.2/hw/xquartz/bundle/Info.plist.cpp
+@@ -19,9 +19,9 @@
+ 	<key>CFBundlePackageType</key>
+ 		<string>APPL</string>
+ 	<key>CFBundleShortVersionString</key>
+-		<string>2.5.2</string>
++		<string>2.5.3</string>
+ 	<key>CFBundleVersion</key>
+-		<string>2.5.2</string>
++		<string>2.5.3</string>
+ 	<key>CFBundleSignature</key>
+ 		<string>x11a</string>
+ 	<key>CSResourcesFileMapped</key>
+-- 
+1.7.2.1
+

Added: trunk/dports/x11/xorg-server/files/0010-Workaround-the-GC-clipping-problem-in-miPaintWindow-.patch
===================================================================
--- trunk/dports/x11/xorg-server/files/0010-Workaround-the-GC-clipping-problem-in-miPaintWindow-.patch	                        (rev 0)
+++ trunk/dports/x11/xorg-server/files/0010-Workaround-the-GC-clipping-problem-in-miPaintWindow-.patch	2010-07-31 21:51:12 UTC (rev 70185)
@@ -0,0 +1,165 @@
+From 1c5084dedbc96cac70c6769d01202f39507f91ed Mon Sep 17 00:00:00 2001
+From: Jeremy Huddleston <jeremyhu at apple.com>
+Date: Fri, 30 Apr 2010 13:08:25 -0700
+Subject: [PATCH 10/11] Workaround the GC clipping problem in miPaintWindow and add some debugging output.
+
+Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
+(cherry picked from commit a9c526bbe10ecf97b6c065fdbc03cc341917a5a6)
+---
+ mi/miexpose.c |  105 +++++++++++++++++++++++++++++++++++++++++++++++++++------
+ 1 files changed, 94 insertions(+), 11 deletions(-)
+
+diff --git xorg-server-1.8.2/mi/miexpose.c xorg-server-1.8.2/mi/miexpose.c
+index f52b492..21493cb 100644
+--- xorg-server-1.8.2/mi/miexpose.c
++++ xorg-server-1.8.2/mi/miexpose.c
+@@ -524,6 +524,7 @@ void RootlessSetPixmapOfAncestors(WindowPtr pWin);
+ void RootlessStartDrawing(WindowPtr pWin);
+ void RootlessDamageRegion(WindowPtr pWin, RegionPtr prgn);
+ Bool IsFramedWindow(WindowPtr pWin);
++#include "../fb/fb.h"
+ #endif 
+ 
+ void
+@@ -551,24 +552,37 @@ miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what)
+     Bool	solid = TRUE;
+     DrawablePtr	drawable = &pWin->drawable;
+ 
++#ifdef XQUARTZ_CLIP_DEBUG
++    ErrorF("START %d BS %d (pR = %ld)\n", what, pWin->backgroundState, ParentRelative);
++    ErrorF("      Rgn: %d %d %d %d\n", prgn->extents.x1, prgn->extents.y1,
++	                               prgn->extents.x2 - prgn->extents.x1,
++	                               prgn->extents.y2 - prgn->extents.y1);
++    ErrorF("      Win: %d %d (%d %d) %d %d\n", pWin->origin.x, pWin->origin.y,
++	                                       pWin->winSize.extents.x1, pWin->winSize.extents.y1,
++	                                       pWin->winSize.extents.x2 - pWin->winSize.extents.x1,
++					       pWin->winSize.extents.y2 - pWin->winSize.extents.y1);
++    ErrorF("     Draw: %d %d %d %d\n", pWin->drawable.x, pWin->drawable.y,
++				       pWin->drawable.width, pWin->drawable.height);
++#endif
++
+ #ifdef ROOTLESS
+     if(!drawable || drawable->type == UNDRAWABLE_WINDOW)
+ 	return;
+-
+-    if(IsFramedWindow(pWin)) {
+-        RootlessStartDrawing(pWin);
+-        RootlessDamageRegion(pWin, prgn);
+-    
+-        if(pWin->backgroundState == ParentRelative) {
+-            if((what == PW_BACKGROUND) || 
+-               (what == PW_BORDER && !pWin->borderIsPixel))
+-                RootlessSetPixmapOfAncestors(pWin);
+-        }
+-    }
+ #endif
+     
+     if (what == PW_BACKGROUND)
+     {
++#ifdef ROOTLESS
++	if(IsFramedWindow(pWin)) {
++	    RootlessStartDrawing(pWin);
++	    RootlessDamageRegion(pWin, prgn);
++
++	    if(pWin->backgroundState == ParentRelative) {
++		RootlessSetPixmapOfAncestors(pWin);
++	    }
++	}
++#endif
++
+ 	while (pWin->backgroundState == ParentRelative)
+ 	    pWin = pWin->parent;
+ 
+@@ -590,6 +604,18 @@ miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what)
+     {
+ 	PixmapPtr   pixmap;
+ 
++#ifdef ROOTLESS
++	if(IsFramedWindow(pWin)) {
++	    RootlessStartDrawing(pWin);
++	    RootlessDamageRegion(pWin, prgn);
++	    
++	    if(!pWin->borderIsPixel &&
++		pWin->backgroundState == ParentRelative) {
++		RootlessSetPixmapOfAncestors(pWin);
++	    }
++	}
++#endif
++
+ 	tile_x_off = drawable->x;
+ 	tile_y_off = drawable->y;
+ 	
+@@ -598,6 +624,12 @@ miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what)
+ 	    return;
+ 	pixmap = (*pScreen->GetWindowPixmap) ((WindowPtr) drawable);
+ 	drawable = &pixmap->drawable;
++
++#ifdef XQUARTZ_CLIP_DEBUG
++	ErrorF("     Draw: %d %d %d %d\n",
++	       drawable->x, drawable->y, drawable->width, drawable->height);    
++#endif
++	
+ #ifdef COMPOSITE
+ 	draw_x_off = pixmap->screen_x;
+ 	draw_y_off = pixmap->screen_y;
+@@ -660,6 +692,57 @@ miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what)
+     dixChangeGC (NullClient, pGC, gcmask, NULL, gcval);
+     ValidateGC (drawable, pGC);
+ 
++#ifdef XQUARTZ_CLIP_DEBUG
++    ErrorF("       GC: %d %d %d %d\n",
++	   pGC->pCompositeClip->extents.x1, pGC->pCompositeClip->extents.y1,
++	   pGC->pCompositeClip->extents.x2 - pGC->pCompositeClip->extents.x1,
++	   pGC->pCompositeClip->extents.y2 - pGC->pCompositeClip->extents.y1);
++#endif
++    
++#ifdef XQUARTZ
++    /* Looks like our clipping isn't set right for some reason:
++     * http://xquartz.macosforge.org/trac/ticket/290
++     */
++    if(what == PW_BORDER) {
++
++#if 0
++	if(solid) {
++#if 1
++	    fbFillRegionSolid(&pWin->drawable,
++			      prgn,
++			      0,
++			      fbReplicatePixel(fill.pixel,
++					       pWin->drawable.bitsPerPixel));
++#else
++	    fbFillRegionSolid(drawable,
++			      prgn,
++			      0,
++			      fbReplicatePixel(fill.pixel,
++					       drawable->bitsPerPixel));
++#endif
++	    return;
++	}
++#endif
++    
++	pGC->pCompositeClip->extents.x1 += prgn->extents.x1;
++	pGC->pCompositeClip->extents.y1 += prgn->extents.y1;
++	pGC->pCompositeClip->extents.x2 += prgn->extents.x1;
++	pGC->pCompositeClip->extents.y2 += prgn->extents.y1;
++	
++	if(pGC->pCompositeClip->extents.x2 > drawable->pScreen->width)
++	    pGC->pCompositeClip->extents.x2 = drawable->pScreen->width;
++	if(pGC->pCompositeClip->extents.y2 > drawable->pScreen->height)
++	    pGC->pCompositeClip->extents.y2 = drawable->pScreen->height;
++    }
++#endif
++
++#ifdef XQUARTZ_CLIP_DEBUG
++    ErrorF("       GC: %d %d %d %d\n",
++	   pGC->pCompositeClip->extents.x1, pGC->pCompositeClip->extents.y1,
++	   pGC->pCompositeClip->extents.x2 - pGC->pCompositeClip->extents.x1,
++	   pGC->pCompositeClip->extents.y2 - pGC->pCompositeClip->extents.y1);    
++#endif
++
+     numRects = REGION_NUM_RECTS(prgn);
+     pbox = REGION_RECTS(prgn);
+     for (i= numRects; --i >= 0; pbox++, prect++)
+-- 
+1.7.2.1
+

Added: trunk/dports/x11/xorg-server/files/0011-fb-Revert-fb-changes-that-broke-XQuartz.patch
===================================================================
--- trunk/dports/x11/xorg-server/files/0011-fb-Revert-fb-changes-that-broke-XQuartz.patch	                        (rev 0)
+++ trunk/dports/x11/xorg-server/files/0011-fb-Revert-fb-changes-that-broke-XQuartz.patch	2010-07-31 21:51:12 UTC (rev 70185)
@@ -0,0 +1,231 @@
+From 2d6f9fe547e22503e23cba6f5edf383ae51637e5 Mon Sep 17 00:00:00 2001
+From: Jeremy Huddleston <jeremyhu at apple.com>
+Date: Fri, 12 Feb 2010 19:48:52 -0800
+Subject: [PATCH 11/11] fb: Revert fb changes that broke XQuartz
+
+http://bugs.freedesktop.org/show_bug.cgi?id=26124
+
+Revert "Fix source pictures getting random transforms after 2d6a8f668342a5190cdf43b5."
+Revert "fb: Adjust transform or composite coordinates for pixman operations"
+
+http://bugs.freedesktop.org/26124
+
+This reverts commit a72c65e9176c51de95db2fdbf4c5d946a4911695.
+This reverts commit a6bd5d2e482a5aa84acb3d4932e2a166d8670ef1.
+
+Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
+---
+ fb/fb.h     |    7 +----
+ fb/fbpict.c |   72 ++++++++++++++++++-----------------------------------------
+ fb/fbtrap.c |    6 +---
+ 3 files changed, 26 insertions(+), 59 deletions(-)
+
+diff --git xorg-server-1.8.2/fb/fb.h xorg-server-1.8.2/fb/fb.h
+index 02d6c03..ed21f9e 100644
+--- xorg-server-1.8.2/fb/fb.h
++++ xorg-server-1.8.2/fb/fb.h
+@@ -2082,11 +2082,8 @@ fbFillRegionSolid (DrawablePtr	pDrawable,
+ 		   FbBits	xor);
+ 
+ extern _X_EXPORT pixman_image_t *
+-image_from_pict (PicturePtr	pict,
+-		 Bool		has_clip,
+-		 int		*xoff,
+-		 int		*yoff);
+-
++image_from_pict (PicturePtr pict,
++		 Bool       has_clip);
+ extern _X_EXPORT void free_pixman_pict (PicturePtr, pixman_image_t *);
+ 
+ #endif /* _FB_H_ */
+diff --git xorg-server-1.8.2/fb/fbpict.c xorg-server-1.8.2/fb/fbpict.c
+index dddfce8..07a2286 100644
+--- xorg-server-1.8.2/fb/fbpict.c
++++ xorg-server-1.8.2/fb/fbpict.c
+@@ -158,24 +158,19 @@ fbComposite (CARD8      op,
+ 	     CARD16     height)
+ {
+     pixman_image_t *src, *mask, *dest;
+-    int src_xoff, src_yoff;
+-    int msk_xoff, msk_yoff;
+-    int dst_xoff, dst_yoff;
+     
+     miCompositeSourceValidate (pSrc, xSrc - xDst, ySrc - yDst, width, height);
+     if (pMask)
+ 	miCompositeSourceValidate (pMask, xMask - xDst, yMask - yDst, width, height);
+     
+-    src = image_from_pict (pSrc, FALSE, &src_xoff, &src_yoff);
+-    mask = image_from_pict (pMask, FALSE, &msk_xoff, &msk_yoff);
+-    dest = image_from_pict (pDst, TRUE, &dst_xoff, &dst_yoff);
++    src = image_from_pict (pSrc, TRUE);
++    mask = image_from_pict (pMask, TRUE);
++    dest = image_from_pict (pDst, TRUE);
+ 
+     if (src && dest && !(pMask && !mask))
+     {
+ 	pixman_image_composite (op, src, mask, dest,
+-				xSrc + src_xoff, ySrc + src_yoff,
+-				xMask + msk_xoff, yMask + msk_yoff,
+-				xDst + dst_xoff, yDst + dst_yoff,
++				xSrc, ySrc, xMask, yMask, xDst, yDst,
+ 				width, height);
+     }
+ 
+@@ -275,22 +270,22 @@ create_conical_gradient_image (PictGradient *gradient)
+ 
+ static pixman_image_t *
+ create_bits_picture (PicturePtr pict,
+-		     Bool       has_clip,
+-		     int	*xoff,
+-		     int	*yoff)
++		     Bool       has_clip)
+ {
+-    PixmapPtr pixmap;
+     FbBits *bits;
+     FbStride stride;
+-    int bpp;
++    int bpp, xoff, yoff;
+     pixman_image_t *image;
+     
+-    fbGetDrawablePixmap (pict->pDrawable, pixmap, *xoff, *yoff);
+-    fbGetPixmapBitsData(pixmap, bits, stride, bpp);
++    fbGetDrawable (pict->pDrawable, bits, stride, bpp, xoff, yoff);
++
++    bits = (FbBits*)((CARD8*)bits +
++		     (pict->pDrawable->y + yoff) * stride * sizeof(FbBits) +
++		     (pict->pDrawable->x + xoff) * (bpp / 8));
+ 
+     image = pixman_image_create_bits (
+ 	pict->format,
+-	pixmap->drawable.width, pixmap->drawable.height,
++	pict->pDrawable->width, pict->pDrawable->height,
+ 	(uint32_t *)bits, stride * sizeof (FbStride));
+     
+     
+@@ -316,52 +311,30 @@ create_bits_picture (PicturePtr pict,
+ 	if (pict->clientClipType != CT_NONE)
+ 	    pixman_image_set_has_client_clip (image, TRUE);
+ 
+-	if (*xoff || *yoff)
+-	    pixman_region_translate (pict->pCompositeClip, *xoff, *yoff);
++	pixman_region_translate (pict->pCompositeClip, - pict->pDrawable->x, - pict->pDrawable->y);
+ 
+ 	pixman_image_set_clip_region (image, pict->pCompositeClip);
+ 
+-	if (*xoff || *yoff)
+-	    pixman_region_translate (pict->pCompositeClip, -*xoff, -*yoff);
++	pixman_region_translate (pict->pCompositeClip, pict->pDrawable->x, pict->pDrawable->y);
+     }
+     
+     /* Indexed table */
+     if (pict->pFormat->index.devPrivate)
+ 	pixman_image_set_indexed (image, pict->pFormat->index.devPrivate);
+ 
+-    /* Add in drawable origin to position within the image */
+-    *xoff += pict->pDrawable->x;
+-    *yoff += pict->pDrawable->y;
+-
+     return image;
+ }
+ 
+ static void
+-set_image_properties (pixman_image_t *image, PicturePtr pict, Bool has_clip, int *xoff, int *yoff)
++set_image_properties (pixman_image_t *image, PicturePtr pict)
+ {
+     pixman_repeat_t repeat;
+     pixman_filter_t filter;
+     
+     if (pict->transform)
+     {
+-	/* For source images, adjust the transform to account
+-	 * for the drawable offset within the pixman image,
+-	 * then set the offset to 0 as it will be used
+-	 * to compute positions within the transformed image.
+-	 */
+-	if (!has_clip) {
+-	    struct pixman_transform	adjusted;
+-
+-	    adjusted = *pict->transform;
+-	    pixman_transform_translate(&adjusted,
+-				       NULL,
+-				       pixman_int_to_fixed(*xoff),
+-				       pixman_int_to_fixed(*yoff));
+-	    pixman_image_set_transform (image, &adjusted);
+-	    *xoff = 0;
+-	    *yoff = 0;
+-	} else
+-	    pixman_image_set_transform (image, pict->transform);
++	pixman_image_set_transform (
++	    image, (pixman_transform_t *)pict->transform);
+     }
+     
+     switch (pict->repeatType)
+@@ -388,8 +361,7 @@ set_image_properties (pixman_image_t *image, PicturePtr pict, Bool has_clip, int
+     
+     if (pict->alphaMap)
+     {
+-	int alpha_xoff, alpha_yoff;
+-	pixman_image_t *alpha_map = image_from_pict (pict->alphaMap, FALSE, &alpha_xoff, &alpha_yoff);
++	pixman_image_t *alpha_map = image_from_pict (pict->alphaMap, TRUE);
+ 	
+ 	pixman_image_set_alpha_map (
+ 	    image, alpha_map, pict->alphaOrigin.x, pict->alphaOrigin.y);
+@@ -422,7 +394,8 @@ set_image_properties (pixman_image_t *image, PicturePtr pict, Bool has_clip, int
+ }
+ 
+ pixman_image_t *
+-image_from_pict (PicturePtr pict, Bool has_clip, int *xoff, int *yoff)
++image_from_pict (PicturePtr pict,
++		 Bool has_clip)
+ {
+     pixman_image_t *image = NULL;
+ 
+@@ -431,7 +404,7 @@ image_from_pict (PicturePtr pict, Bool has_clip, int *xoff, int *yoff)
+ 
+     if (pict->pDrawable)
+     {
+-	image = create_bits_picture (pict, has_clip, xoff, yoff);
++	image = create_bits_picture (pict, has_clip);
+     }
+     else if (pict->pSourcePict)
+     {
+@@ -452,11 +425,10 @@ image_from_pict (PicturePtr pict, Bool has_clip, int *xoff, int *yoff)
+ 	    else if (sp->type == SourcePictTypeConical)
+ 		image = create_conical_gradient_image (gradient);
+ 	}
+-	*xoff = *yoff = 0;
+     }
+     
+     if (image)
+-	set_image_properties (image, pict, has_clip, xoff, yoff);
++	set_image_properties (image, pict);
+     
+     return image;
+ }
+diff --git xorg-server-1.8.2/fb/fbtrap.c xorg-server-1.8.2/fb/fbtrap.c
+index 515e2e1..830603a 100644
+--- xorg-server-1.8.2/fb/fbtrap.c
++++ xorg-server-1.8.2/fb/fbtrap.c
+@@ -40,8 +40,7 @@ fbAddTraps (PicturePtr	pPicture,
+ 	    int		ntrap,
+ 	    xTrap	*traps)
+ {
+-    int image_xoff, image_yoff;
+-    pixman_image_t *image = image_from_pict (pPicture, FALSE, &image_xoff, &image_yoff);
++    pixman_image_t *image = image_from_pict (pPicture, FALSE);
+ 
+     if (!image)
+ 	return;
+@@ -57,8 +56,7 @@ fbRasterizeTrapezoid (PicturePtr    pPicture,
+ 		      int	    x_off,
+ 		      int	    y_off)
+ {
+-    int	mask_xoff, mask_yoff;
+-    pixman_image_t *image = image_from_pict (pPicture, FALSE, &mask_xoff, &mask_yoff);
++    pixman_image_t *image = image_from_pict (pPicture, FALSE);
+ 
+     if (!image)
+ 	return;
+-- 
+1.7.2.1
+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100731/6d396e3b/attachment-0001.html>


More information about the macports-changes mailing list