[xserver-commit] xserver/render mirect.c,1.5,1.6

Keith Packard xserver-commit@pdx.freedesktop.org
Sat, 08 Nov 2003 23:06:01 -0800


Committed by: keithp

Update of /cvs/xserver/xserver/render
In directory pdx:/tmp/cvs-serv8142/render

Modified Files:
	mirect.c 
Log Message:
	* composite/compinit.c: (compCloseScreen), (compScreenInit):
	* composite/compint.h:
	* composite/compwindow.c: (compCheckWindow),
	(compPaintWindowBackground), (compDestroyWindow):
	* damageext/damageext.c: (DamageExtNotify), (DamageExtDestroy),
	(ProcDamageSubtract), (FreeDamageExt), (FreeDamageExtWin):
	* dix/window.c: (SetBorderSize):
	* miext/damage/damage.c: (damageDamageRegion), (damageDamageBox),
	(damageDestroyPixmap), (damagePaintWindow), (damageCopyWindow),
	(damageRestoreAreas), (damageSetWindowPixmap),
	(damageDestroyWindow), (DamageSetup), (DamageCreate),
	(DamageRegister), (DamageUnregister), (DamageSubtract),
	(DamageDamageRegion):
	* miext/damage/damagestr.h:
	* render/mirect.c: (miColorRects):

	Wrap PaintWindowBackground in composite extension to
	disable painting window background in manual Subwindows mode.

	compDestroyWindow needed to refetch cw and csw because
	CompFreeClientWindow/compFreeClientSubwindows zeroed them.

	Damage must store all damage in window relative
	coordinates so that damage tracks window movement.  I doubt
	this will work "right" with bitGravity, apps are likely to
	lose in that case anyway.

	Check for clientGone before trying to write events.

	Better checking for freeing datastructures in various orders

	dix/window.c: oops.  Was setting wrong region in COMPOSITE side
	of SetBorderSize.

	Damage must be associated with windows, not just underlying pixmap
	in case that changes.  Wrap SetWindowPixmap to track changes
	to window pixmaps (and DestroyWindow as well).

	Don't smash PaintWindow/CopyWindow regions in damageDamageRegion.
	Also, translate region back for those cases.

	render/mirect.c: track subWindowMode (oops)


Index: mirect.c
===================================================================
RCS file: /cvs/xserver/xserver/render/mirect.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- mirect.c	11 Sep 2003 05:12:51 -0000	1.5
+++ mirect.c	9 Nov 2003 07:05:59 -0000	1.6
@@ -45,7 +45,7 @@
     ScreenPtr		pScreen = pDst->pDrawable->pScreen;
     CARD32		pixel;
     GCPtr		pGC;
-    CARD32		tmpval[4];
+    CARD32		tmpval[5];
     RegionPtr		pClip;
     unsigned long	mask;
 
@@ -56,12 +56,13 @@
 	return;
     tmpval[0] = GXcopy;
     tmpval[1] = pixel;
-    mask = GCFunction | GCForeground;
+    tmpval[2] = pDst->subWindowMode;
+    mask = GCFunction | GCForeground | GCSubwindowMode;
     if (pClipPict->clientClipType == CT_REGION)
     {
-	tmpval[2] = pDst->clipOrigin.x - xoff;
-	tmpval[3] = pDst->clipOrigin.y - yoff;
-	mask |= CPClipXOrigin|CPClipYOrigin;
+	tmpval[3] = pDst->clipOrigin.x - xoff;
+	tmpval[4] = pDst->clipOrigin.y - yoff;
+	mask |= GCClipXOrigin|GCClipYOrigin;
 	
 	pClip = REGION_CREATE (pScreen, NULL, 1);
 	REGION_COPY (pScreen, pClip,