afcbbe
From: Adam Jackson <ajax@redhat.com>
afcbbe
Date: Sun, 28 Oct 2007 09:37:52 +0100
afcbbe
Subject: [PATCH] Send less damage for manually redirected windows.
afcbbe
Kristian Høgsberg d470a6
Disable damage notifications on move for manually redirected windows.
Kristian Høgsberg d470a6
The automatic compositor needs damage notification on move, but a
Kristian Høgsberg d470a6
compositing manager doesn't.
Kristian Høgsberg d470a6
afcbbe
---
afcbbe
--- a/composite/compwindow.c.spiffiffity	2006-03-29 12:51:53.000000000 -0500
afcbbe
+++ b/composite/compwindow.c	2006-04-13 23:18:42.000000000 -0400
Kristian Høgsberg d470a6
@@ -571,12 +571,15 @@
Kristian Høgsberg d470a6
     }
Kristian Høgsberg d470a6
     else
Kristian Høgsberg d470a6
     {
Kristian Høgsberg d470a6
+	CompWindowPtr	cw = GetCompWindow (pWin);
Kristian Høgsberg d470a6
+
Kristian Høgsberg d470a6
 	ptOldOrg.x -= dx;
Kristian Høgsberg d470a6
 	ptOldOrg.y -= dy;
Kristian Høgsberg d470a6
 	REGION_TRANSLATE (prgnSrc, prgnSrc,
Kristian Høgsberg d470a6
 			  pWin->drawable.x - ptOldOrg.x,
Kristian Høgsberg d470a6
 			  pWin->drawable.y - ptOldOrg.y);
Kristian Høgsberg d470a6
-	DamageDamageRegion (&pWin->drawable, prgnSrc);
Kristian Høgsberg d470a6
+	if (pWin->redirectDraw && cw->update == CompositeRedirectAutomatic)
Kristian Høgsberg d470a6
+	  DamageDamageRegion (&pWin->drawable, prgnSrc);
Kristian Høgsberg d470a6
     }
Kristian Høgsberg d470a6
     cs->CopyWindow = pScreen->CopyWindow;
Kristian Høgsberg d470a6
     pScreen->CopyWindow = compCopyWindow;
Kristian Høgsberg d470a6
@@ -655,7 +658,8 @@
Kristian Høgsberg d470a6
     /*
Kristian Høgsberg d470a6
      * Report that as damaged so it will be redrawn
Kristian Høgsberg d470a6
      */
Kristian Høgsberg d470a6
-    DamageDamageRegion (&pWin->drawable, &damage);
Kristian Høgsberg d470a6
+    if (cw->update == CompositeRedirectAutomatic)
Kristian Høgsberg d470a6
+      DamageDamageRegion (&pWin->drawable, &damage);
Kristian Høgsberg d470a6
     REGION_UNINIT (pScreen, &damage);
Kristian Høgsberg d470a6
     /*
Kristian Høgsberg d470a6
      * Save the new border clip region