From 2c3d96e3ca93e66ebf6349f3bb5f3e4b5984f680 Mon Sep 17 00:00:00 2001 From: stefan11111 Date: Thu, 25 Sep 2025 15:54:12 +0300 Subject: [PATCH] composite: add a comment Signed-off-by: stefan11111 --- composite/compalloc.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/composite/compalloc.c b/composite/compalloc.c index 4a3821e87a..c4554f50b9 100644 --- a/composite/compalloc.c +++ b/composite/compalloc.c @@ -544,6 +544,13 @@ compNewPixmap(WindowPtr pWin, int x, int y, int w, int h) return pPixmap; } + /* + * Copy bits from the parent into the new pixmap so that it will + * have "reasonable" contents in case for background None areas. + * + * This can be very expensive, so we only do it when we absolutely have to. + */ + if (pParent->drawable.depth == pWin->drawable.depth) { GCPtr pGC = GetScratchGC(pWin->drawable.depth, pScreen);