From 9ac895fccba72c6d4c0e754ab5298ece7dc8632d Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Mon, 2 Sep 2013 13:03:33 +0100 Subject: [PATCH] sna: Process winSize region Sometimes the window size is not a simple box, but a full region. In which case we do need to process it and not just assert that it is a box! Reported-by: Jiri Slaby References: https://bugs.freedesktop.org/show_bug.cgi?id=47597 Signed-off-by: Chris Wilson --- src/sna/sna_accel.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index 9db3f27d..2205b339 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -5641,8 +5641,10 @@ sna_do_copy(DrawablePtr src, DrawablePtr dst, GCPtr gc, if (gc->subWindowMode == IncludeInferiors) { DBG(("%s: window -- include inferiors\n", __FUNCTION__)); - assert(!w->winSize.data); - box_intersect(®ion.extents, &w->winSize.extents); + if (w->winSize.data) + RegionIntersect(®ion, ®ion, &w->winSize); + else + box_intersect(®ion.extents, &w->winSize.extents); clip = &w->borderClip; } else { DBG(("%s: window -- clip by children\n", __FUNCTION__));