Blob Blame History Raw
From: Adam Jackson <ajax@redhat.com>
Date: Sun, 28 Oct 2007 09:37:52 +0100
Subject: [PATCH] Send less damage for manually redirected windows.

Disable damage notifications on move for manually redirected windows.
The automatic compositor needs damage notification on move, but a
compositing manager doesn't.

---
--- a/composite/compwindow.c.spiffiffity	2006-03-29 12:51:53.000000000 -0500
+++ b/composite/compwindow.c	2006-04-13 23:18:42.000000000 -0400
@@ -571,12 +571,15 @@
     }
     else
     {
+	CompWindowPtr	cw = GetCompWindow (pWin);
+
 	ptOldOrg.x -= dx;
 	ptOldOrg.y -= dy;
 	REGION_TRANSLATE (prgnSrc, prgnSrc,
 			  pWin->drawable.x - ptOldOrg.x,
 			  pWin->drawable.y - ptOldOrg.y);
-	DamageDamageRegion (&pWin->drawable, prgnSrc);
+	if (pWin->redirectDraw && cw->update == CompositeRedirectAutomatic)
+	  DamageDamageRegion (&pWin->drawable, prgnSrc);
     }
     cs->CopyWindow = pScreen->CopyWindow;
     pScreen->CopyWindow = compCopyWindow;
@@ -655,7 +658,8 @@
     /*
      * Report that as damaged so it will be redrawn
      */
-    DamageDamageRegion (&pWin->drawable, &damage);
+    if (cw->update == CompositeRedirectAutomatic)
+      DamageDamageRegion (&pWin->drawable, &damage);
     REGION_UNINIT (pScreen, &damage);
     /*
      * Save the new border clip region