Commit 1731d065 authored by Olivier Fourdan's avatar Olivier Fourdan 🛠

compositor: Ignore opaque region for shaded windows

Typically, the opaque region applies to the client window.

When shaded, the client window is unmapped and the frame shrunk to its
minimum height.

When shaded, the opaque regio nshould simply be ignored as the client
window is no longer visible.
Signed-off-by: Olivier Fourdan's avatarOlivier Fourdan <>
Closes: #452
parent b1443c17
Pipeline #3881 passed with stages
in 3 minutes and 4 seconds
......@@ -97,6 +97,7 @@
#define WIN_IS_DAMAGED(cw) (cw->damaged)
#define WIN_IS_REDIRECTED(cw) (cw->redirected)
#define WIN_IS_SHADED(cw) (WIN_HAS_CLIENT(cw) && FLAG_TEST (cw->c->flags, CLIENT_FLAG_SHADED))
......@@ -2168,6 +2169,12 @@ clip_opaque_region (CWindow *cw, XserverRegion region)
g_return_if_fail (cw != NULL);
TRACE ("window 0x%lx", cw->id);
if (cw->opaque_region == None)
TRACE ("window 0x%lx has no opaque region", cw->id);
screen_info = cw->screen_info;
display_info = screen_info->display_info;
......@@ -2314,7 +2321,7 @@ paint_all (ScreenInfo *screen_info, XserverRegion region, gushort buffer)
XFixesCopyRegion (dpy, cw->borderClip, paint_region);
if ((cw->opacity == NET_WM_OPAQUE) && (cw->opaque_region != None))
if ((cw->opacity == NET_WM_OPAQUE) && !WIN_IS_SHADED(cw))
clip_opaque_region (cw, paint_region);
Markdown is supported
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