[mutter/configurable-shadows: 12/13] Omit shadows for fullscreen and maximized windows
- From: Owen Taylor <otaylor src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/configurable-shadows: 12/13] Omit shadows for fullscreen and maximized windows
- Date: Sat, 13 Nov 2010 16:52:28 +0000 (UTC)
commit c853d197e32cca3a49f876dd749d2d7892817abe
Author: Owen W. Taylor <otaylor fishsoup net>
Date: Thu Nov 11 18:43:35 2010 -0500
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 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/compositor/meta-window-actor.c b/src/compositor/meta-window-actor.c
index 47da17f..e575162 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.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]