Commit 375691c6 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧 Committed by Aleix Pol Gonzalez
Browse files

Improve opacity detection

If the opaque area covers all the window's shape, it means that it's an
opaque window.
This is how GTK presents opacity right now, so we'll get to skip
rendering under GTK clients and other compatible ones.
Qt is still not emitting opacity.
parent a58100fc
......@@ -294,6 +294,10 @@ void Scene::paintSimpleScreen(int orig_mask, const QRegion &region)
const QRegion shape = windowPixmap->mapToGlobal(windowPixmap->shape());
const QRegion opaque = windowPixmap->mapToGlobal(windowPixmap->opaque());
data.clip = shape & opaque;
if (opaque == shape) {
data.mask = orig_mask | PAINT_WINDOW_OPAQUE;
} else {
data.clip = QRegion();
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment