722283
From c7e37fc93d9efa010f60be260f741539600db597 Mon Sep 17 00:00:00 2001
afcbbe
From: Adam Jackson <ajax@redhat.com>
722283
Date: Fri, 19 Dec 2008 13:42:52 +1000
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
722283
Forward-ported to 1.6 by whot.
afcbbe
---
722283
 composite/compwindow.c |    8 ++++++--
722283
 1 files changed, 6 insertions(+), 2 deletions(-)
722283
722283
diff --git a/composite/compwindow.c b/composite/compwindow.c
722283
index 577fa73..f838a24 100644
722283
--- a/composite/compwindow.c
722283
+++ b/composite/compwindow.c
722283
@@ -580,12 +580,15 @@ compCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
Kristian Høgsberg d470a6
     }
Kristian Høgsberg d470a6
     else
Kristian Høgsberg d470a6
     {
722283
+	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);
722283
-	DamageRegionAppend(&pWin->drawable, prgnSrc);
Kristian Høgsberg d470a6
+	if (pWin->redirectDraw && cw->update == CompositeRedirectAutomatic)
722283
+	    DamageRegionAppend(&pWin->drawable, prgnSrc);
Kristian Høgsberg d470a6
     }
Kristian Høgsberg d470a6
     cs->CopyWindow = pScreen->CopyWindow;
Kristian Høgsberg d470a6
     pScreen->CopyWindow = compCopyWindow;
722283
@@ -664,7 +667,8 @@ compSetRedirectBorderClip (WindowPtr pWin, RegionPtr pRegion)
Kristian Høgsberg d470a6
     /*
Kristian Høgsberg d470a6
      * Report that as damaged so it will be redrawn
Kristian Høgsberg d470a6
      */
722283
-    DamageRegionAppend(&pWin->drawable, &damage);
722283
+    if (pWin->redirectDraw && cw->update == CompositeRedirectAutomatic)
722283
+	DamageRegionAppend(&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
722283
-- 
722283
1.6.0.4
722283