window-actor: Draw shadows around some CSD windows

Some windows, like Chromium and Steam, are technically CSD in that they
don't want a system titlebar and draw their own, but we should still
provide them with a shadow.
This commit is contained in:
Jasper St. Pierre 2015-10-07 12:06:31 -07:00
parent 86d8c3954f
commit b975676c5d

View File

@ -832,21 +832,23 @@ meta_window_actor_has_shadow (MetaWindowActor *self)
return TRUE; return TRUE;
/* /*
* Do not add shadows to non-opaque windows; eventually we should generate * Do not add shadows to non-opaque (ARGB32) windows, as we can't easily
* a shadow from the input shape for such windows. * generate shadows for them.
*/ */
if (is_non_opaque (self)) if (is_non_opaque (self))
return FALSE; return FALSE;
/* /*
* Add shadows to override redirect windows on X11 unless the toolkit * If a window specifies that it has custom frame extents, that likely
* indicates that it is handling shadows itself (e.g., Gtk menus). * means that it is drawing a shadow itself. Don't draw our own.
*/ */
if (priv->window->override_redirect && if (priv->window->has_custom_frame_extents)
!priv->window->has_custom_frame_extents) return FALSE;
return TRUE;
return FALSE; /*
* Generate shadows for all other windows.
*/
return TRUE;
} }
/** /**