diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2022-09-12 12:27:03 +0200 |
---|---|---|
committer | Marge Bot <marge-bot@gnome.org> | 2022-12-01 20:10:53 +0000 |
commit | 9feac5ce62bc0bf6f1960576a53082addd4d516a (patch) | |
tree | 7f92542dfa9c377fb291c03d0e4670c3c2e467bb | |
parent | 84785951fd0ce4e7b1f69a2b21460e19f6158b68 (diff) | |
download | mutter-9feac5ce62bc0bf6f1960576a53082addd4d516a.tar.gz |
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>
-rw-r--r-- | src/compositor/meta-window-actor-x11.c | 4 | ||||
-rw-r--r-- | src/core/frame.c | 7 |
2 files changed, 5 insertions, 6 deletions
diff --git a/src/compositor/meta-window-actor-x11.c b/src/compositor/meta-window-actor-x11.c index f5c6de376..e48d21d6a 100644 --- a/src/compositor/meta-window-actor-x11.c +++ b/src/compositor/meta-window-actor-x11.c @@ -397,11 +397,11 @@ has_shadow (MetaWindowActorX11 *actor_x11) 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. */ if (meta_window_get_frame (window)) - return TRUE; + return FALSE; /* * Do not add shadows to non-opaque (ARGB32) windows, as we can't easily diff --git a/src/core/frame.c b/src/core/frame.c index a2bb00421..4fa5153a3 100644 --- a/src/core/frame.c +++ b/src/core/frame.c @@ -473,10 +473,9 @@ meta_frame_get_mask (MetaFrame *frame, meta_frame_calc_borders (frame, &borders); cairo_rectangle (cr, - borders.invisible.left, - borders.invisible.top, - frame_rect->width, - frame_rect->height); + 0, 0, + frame->rect.width, + frame->rect.height); cairo_set_source_rgb (cr, 0, 0, 0); cairo_fill (cr); } |