Always include the window decoration's clipping

No need to only report opacity on the window decoration if the window
itself is opaque.
This commit is contained in:
Aleix Pol 2020-09-25 19:42:34 +02:00
parent 688dc9ac1d
commit 309d6a0d5b

View file

@ -276,14 +276,12 @@ void Scene::paintSimpleScreen(int orig_mask, const QRegion &region)
// Clip out the decoration for opaque windows; the decoration is drawn in the second pass // 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?) opaqueFullscreen = false; // TODO: do we care about unmanged windows here (maybe input windows?)
if (window->isOpaque()) {
AbstractClient *client = dynamic_cast<AbstractClient *>(toplevel); AbstractClient *client = dynamic_cast<AbstractClient *>(toplevel);
if (window->isOpaque()) {
if (client) { if (client) {
opaqueFullscreen = client->isFullScreen(); opaqueFullscreen = client->isFullScreen();
} }
if (!(client && client->decorationHasAlpha())) {
data.clip = window->decorationShape().translated(window->pos());
}
const WindowPixmap *windowPixmap = window->windowPixmap<WindowPixmap>(); const WindowPixmap *windowPixmap = window->windowPixmap<WindowPixmap>();
if (windowPixmap) { if (windowPixmap) {
data.clip |= windowPixmap->mapToGlobal(windowPixmap->shape()); data.clip |= windowPixmap->mapToGlobal(windowPixmap->shape());
@ -302,6 +300,11 @@ void Scene::paintSimpleScreen(int orig_mask, const QRegion &region)
} else { } else {
data.clip = QRegion(); data.clip = QRegion();
} }
if (client && !client->decorationHasAlpha() && toplevel->opacity() == 1.0) {
data.clip |= window->decorationShape().translated(window->pos());
}
data.quads = window->buildQuads(); data.quads = window->buildQuads();
// preparation step // preparation step
effects->prePaintWindow(effectWindow(window), data, time_diff); effects->prePaintWindow(effectWindow(window), data, time_diff);