From 309d6a0d5bd58e9b9babf87fe0387398aa243bd8 Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Fri, 25 Sep 2020 19:42:34 +0200 Subject: [PATCH] Always include the window decoration's clipping No need to only report opacity on the window decoration if the window itself is opaque. --- scene.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/scene.cpp b/scene.cpp index edb447f876..4103727675 100644 --- a/scene.cpp +++ b/scene.cpp @@ -276,14 +276,12 @@ void Scene::paintSimpleScreen(int orig_mask, const QRegion ®ion) // Clip out the decoration for opaque windows; the decoration is drawn in the second pass opaqueFullscreen = false; // TODO: do we care about unmanged windows here (maybe input windows?) + AbstractClient *client = dynamic_cast(toplevel); if (window->isOpaque()) { - AbstractClient *client = dynamic_cast(toplevel); if (client) { opaqueFullscreen = client->isFullScreen(); } - if (!(client && client->decorationHasAlpha())) { - data.clip = window->decorationShape().translated(window->pos()); - } + const WindowPixmap *windowPixmap = window->windowPixmap(); if (windowPixmap) { data.clip |= windowPixmap->mapToGlobal(windowPixmap->shape()); @@ -302,6 +300,11 @@ void Scene::paintSimpleScreen(int orig_mask, const QRegion ®ion) } else { data.clip = QRegion(); } + + if (client && !client->decorationHasAlpha() && toplevel->opacity() == 1.0) { + data.clip |= window->decorationShape().translated(window->pos()); + } + data.quads = window->buildQuads(); // preparation step effects->prePaintWindow(effectWindow(window), data, time_diff);