mirror of
https://github.com/brl/mutter.git
synced 2024-11-24 17:10:40 -05:00
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
This commit is contained in:
parent
bf7ae3e4d3
commit
c853d197e3
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user