compositor: Opt out compositor shadows from windows with frames

Let the frames client render its own shadow. In order to do that,
avoid double painting a shadow on the compositor side, and extend
the mask area of the frame, so it does unveil the (so far)
hidden frames-client-side shadows.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2175>
This commit is contained in:
Carlos Garnacho 2022-09-12 12:27:03 +02:00 committed by Marge Bot
parent 84785951fd
commit 9feac5ce62
2 changed files with 5 additions and 6 deletions

View File

@ -397,11 +397,11 @@ has_shadow (MetaWindowActorX11 *actor_x11)
return FALSE; return FALSE;
/* /*
* Always put a shadow around windows with a frame - This should override * Let the frames client put a shadow around frames - This should override
* the restriction about not putting a shadow around ARGB windows. * the restriction about not putting a shadow around ARGB windows.
*/ */
if (meta_window_get_frame (window)) if (meta_window_get_frame (window))
return TRUE; return FALSE;
/* /*
* Do not add shadows to non-opaque (ARGB32) windows, as we can't easily * Do not add shadows to non-opaque (ARGB32) windows, as we can't easily

View File

@ -473,10 +473,9 @@ meta_frame_get_mask (MetaFrame *frame,
meta_frame_calc_borders (frame, &borders); meta_frame_calc_borders (frame, &borders);
cairo_rectangle (cr, cairo_rectangle (cr,
borders.invisible.left, 0, 0,
borders.invisible.top, frame->rect.width,
frame_rect->width, frame->rect.height);
frame_rect->height);
cairo_set_source_rgb (cr, 0, 0, 0); cairo_set_source_rgb (cr, 0, 0, 0);
cairo_fill (cr); cairo_fill (cr);
} }