From c853d197e32cca3a49f876dd749d2d7892817abe Mon Sep 17 00:00:00 2001 From: "Owen W. Taylor" Date: Thu, 11 Nov 2010 18:43:35 -0500 Subject: [PATCH] Omit shadows for fullscreen and maximized windows Fullscreen and maximized windows never have visible shadows - the only case where we would ever see them is if they bleed onto an adjacent monitor and that looks bad. It's small performance win to avoid computing them, and this also avoids painting the top shadow for all maximized windows in GNOME Shell - since the top panel isn't a X window, it doesn't factor into the computation of what parts of windows are visible and maximized windows are computed as having a top shadow. https://bugzilla.gnome.org/show_bug.cgi?id=592382 --- src/compositor/meta-window-actor.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/compositor/meta-window-actor.c b/src/compositor/meta-window-actor.c index 47da17f04..e57516223 100644 --- a/src/compositor/meta-window-actor.c +++ b/src/compositor/meta-window-actor.c @@ -752,6 +752,13 @@ meta_window_actor_has_shadow (MetaWindowActor *self) if (priv->no_shadow) return FALSE; + /* Leaving out shadows for maximized and fullscreen windows is an effeciency + * win and also prevents the unsightly effect of the shadow of maximized + * window appearing on an adjacent window */ + if ((meta_window_get_maximized (priv->window) == (META_MAXIMIZE_HORIZONTAL | META_MAXIMIZE_VERTICAL)) || + meta_window_is_fullscreen (priv->window)) + return FALSE; + /* * Always put a shadow around windows with a frame - This should override * the restriction about not putting a shadow around ARGB windows.