[mutter/wip/carlosg/frames-client: 1005/1005] compositor: Opt out compositor shadows from windows with frames
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/carlosg/frames-client: 1005/1005] compositor: Opt out compositor shadows from windows with frames
- Date: Mon, 12 Sep 2022 12:29:21 +0000 (UTC)
commit 0206d57681baec934b2aee7f270c2e6dfffe42d8
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon Sep 12 12:27:03 2022 +0200
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.
src/compositor/meta-window-actor-x11.c | 4 ++--
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 4d0a8f044f..b982b496fd 100644
--- a/src/compositor/meta-window-actor-x11.c
+++ b/src/compositor/meta-window-actor-x11.c
@@ -592,11 +592,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 4bb3bf72e3..b541fa9c05 100644
--- a/src/core/frame.c
+++ b/src/core/frame.c
@@ -468,10 +468,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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]