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.
This commit is contained in:
parent
a58100fc72
commit
375691c6c2
1 changed files with 4 additions and 0 deletions
|
@ -294,6 +294,10 @@ void Scene::paintSimpleScreen(int orig_mask, const QRegion ®ion)
|
|||
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();
|
||||
|
|
Loading…
Reference in a new issue