summaryrefslogtreecommitdiff
path: root/miext
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2017-02-07 17:38:23 +0900
committerAdam Jackson <ajax@redhat.com>2017-02-23 14:55:00 -0500
commit04c72d3c30623e360fd0bd37ed559915b93467f4 (patch)
tree2053c8189f237058ce67c20d328c357b3777718e /miext
parent5c1dd4eba833ecf4ea789c8319b4e25ea1e1fab9 (diff)
damage: Validate source pictures bound to windows before unwrapping
The lower layers also do this, but no damage may be reported there, since we unwrap before calling down. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99220 Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit 38696ea56854e055c31bd2730adfc7c39aa115b0)
Diffstat (limited to 'miext')
-rw-r--r--miext/damage/damage.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/miext/damage/damage.c b/miext/damage/damage.c
index d6a36142d..2fae03fc2 100644
--- a/miext/damage/damage.c
+++ b/miext/damage/damage.c
@@ -34,6 +34,7 @@
#include <X11/fonts/fontstruct.h>
#include <X11/fonts/libxfont2.h>
#include "mi.h"
+#include "mipict.h"
#include "regionstr.h"
#include "globals.h"
#include "gcstruct.h"
@@ -499,6 +500,15 @@ damageComposite(CARD8 op,
if (BOX_NOT_EMPTY(box))
damageDamageBox(pDst->pDrawable, &box, pDst->subWindowMode);
}
+ /*
+ * Validating a source picture bound to a window may trigger other
+ * composite operations. Do it before unwrapping to make sure damage
+ * is reported correctly.
+ */
+ if (pSrc->pDrawable && WindowDrawable(pSrc->pDrawable->type))
+ miCompositeSourceValidate(pSrc);
+ if (pMask && pMask->pDrawable && WindowDrawable(pMask->pDrawable->type))
+ miCompositeSourceValidate(pMask);
unwrap(pScrPriv, ps, Composite);
(*ps->Composite) (op,
pSrc,