Commit 35a3184e authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

Fix computation of effective opaque region of SurfaceItemX11

The value of _NET_WM_OPAQUE_REGION can be out of sync with the geometry
of the window. The NETWM spec suggests to compute the effective opaque
region by taking intersection of _NET_WM_OPAQUE_REGION and the bounding
region set by the shape extension.

SurfaceItemX11::opaque() got broken after refactoring opaque region
handling in wayland surfaces so SurfaceInterface::opaque() always
returns a sane value, the computation of effective opaque region is done
in SurfaceInterface at commit time.

BUG: 455617
parent c1a536a5
Pipeline #193313 failed with stage
in 21 minutes and 16 seconds
......@@ -139,7 +139,11 @@ QRegion SurfaceItemX11::shape() const
QRegion SurfaceItemX11::opaque() const
{
return window()->opaqueRegion();
if (!window()->hasAlpha()) {
return shape();
} else {
return window()->opaqueRegion() & shape();
}
}
SurfacePixmap *SurfaceItemX11::createPixmap()
......
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