[xserver-commit] xserver/dix window.c,3.34.2.1,3.34.2.2

Keith Packard xserver-commit@pdx.freedesktop.org
Fri, 31 Oct 2003 13:48:12 -0800


Committed by: keithp

Update of /cvs/xserver/xserver/dix
In directory pdx:/tmp/cvs-serv21043/dix

Modified Files:
      Tag: xfixes_2_branch
	window.c 
Log Message:
	* Xext/shm.c: (ShmRegisterFbFuncs):
	* Xext/shmint.h:
	* dix/window.c: (SetWinSize), (SetBorderSize):
	* fb/Makefile.am:
	* fb/fbcmap.c:
	* fb/fboverlay.c:
	* include/windowstr.h:
	* mi/mivaltree.c: (miComputeClips):
	Move MIT-SHM server declarations to shmint.h
	Start APPORTION dix hooks
	Comment out fbHasVisualTypes as it appears unused


Index: window.c
===================================================================
RCS file: /cvs/xserver/xserver/dix/window.c,v
retrieving revision 3.34.2.1
retrieving revision 3.34.2.2
diff -u -d -r3.34.2.1 -r3.34.2.2
--- window.c	19 Oct 2003 20:34:20 -0000	3.34.2.1
+++ window.c	31 Oct 2003 21:48:09 -0000	3.34.2.2
@@ -300,6 +300,9 @@
     pWin->srcBuffer = DBE_FRONT_BUFFER;
     pWin->dstBuffer = DBE_FRONT_BUFFER;
 #endif
+#ifdef APPORTION
+    pWin->redirectDraw = 0;
+#endif
 }
 
 static void
@@ -1672,9 +1675,21 @@
 }
 
 void
-SetWinSize (pWin)
-    register WindowPtr pWin;
+SetWinSize (WindowPtr pWin)
 {
+#ifdef APPORTION
+    if (pWin->redirectDraw)
+    {
+	BoxRec	box;
+
+	box.x1 = pWin->drawable.x;
+	box.y1 = pWin->drawable.y;
+	box.x2 = pWin->drawable.x + pWin->drawable.width;
+	box.y2 = pWin->drawable.y + pWin->drawable.height;
+	REGION_RESET (pScreen, &pWin->winSize, &box);
+    }
+    else
+#endif
     ClippedRegionFromBox(pWin->parent, &pWin->winSize,
 			 pWin->drawable.x, pWin->drawable.y,
 			 (int)pWin->drawable.width,
@@ -1698,13 +1713,25 @@
 }
 
 void
-SetBorderSize (pWin)
-    register WindowPtr pWin;
+SetBorderSize (WindowPtr pWin)
 {
     int	bw;
 
     if (HasBorder (pWin)) {
 	bw = wBorderWidth (pWin);
+#ifdef APPORTION
+	if (pWin->redirectDraw)
+	{
+	    BoxRec	box;
+
+	    box.x1 = pWin->drawable.x - bw;
+	    box.y1 = pWin->drawable.y - bw;
+	    box.x2 = pWin->drawable.x + pWin->drawable.width + (bw << 1);
+	    box.y2 = pWin->drawable.y + pWin->drawable.height + (bw << 1);
+	    REGION_RESET (pScreen, &pWin->winSize, &box);
+	}
+	else
+#endif
 	ClippedRegionFromBox(pWin->parent, &pWin->borderSize,
 		pWin->drawable.x - bw, pWin->drawable.y - bw,
 		(int)(pWin->drawable.width + (bw<<1)),