From b975676c5ddd9401d4acfc4d0b9317dd8956656b Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Wed, 7 Oct 2015 12:06:31 -0700 Subject: [PATCH] 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. --- src/compositor/meta-window-actor.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/compositor/meta-window-actor.c b/src/compositor/meta-window-actor.c index 0202fdaa8..58a2d81bb 100644 --- a/src/compositor/meta-window-actor.c +++ b/src/compositor/meta-window-actor.c @@ -832,21 +832,23 @@ meta_window_actor_has_shadow (MetaWindowActor *self) return TRUE; /* - * Do not add shadows to non-opaque windows; eventually we should generate - * a shadow from the input shape for such windows. + * Do not add shadows to non-opaque (ARGB32) windows, as we can't easily + * generate shadows for them. */ if (is_non_opaque (self)) return FALSE; /* - * Add shadows to override redirect windows on X11 unless the toolkit - * indicates that it is handling shadows itself (e.g., Gtk menus). + * If a window specifies that it has custom frame extents, that likely + * means that it is drawing a shadow itself. Don't draw our own. */ - if (priv->window->override_redirect && - !priv->window->has_custom_frame_extents) - return TRUE; + if (priv->window->has_custom_frame_extents) + return FALSE; - return FALSE; + /* + * Generate shadows for all other windows. + */ + return TRUE; } /**