summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasper St. Pierre <jstpierre@mecheye.net>2015-10-07 12:06:31 -0700
committerJasper St. Pierre <jstpierre@mecheye.net>2015-10-07 12:09:30 -0700
commitb975676c5ddd9401d4acfc4d0b9317dd8956656b (patch)
tree6f0ec3cbc094c21b1e2115f37ebf9120b1cb6f83
parent86d8c3954fe2f9e206d92710f6e28888dd34d995 (diff)
downloadmutter-b975676c5ddd9401d4acfc4d0b9317dd8956656b.tar.gz
window-actor: Draw shadows around some CSD windowsbaserock/3.18.0-25-gb975676
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.
-rw-r--r--src/compositor/meta-window-actor.c18
1 files 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;
}
/**