[mutter] window-actor: Draw shadows around some CSD windows



commit b975676c5ddd9401d4acfc4d0b9317dd8956656b
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Wed Oct 7 12:06:31 2015 -0700

    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 files changed, 10 insertions(+), 8 deletions(-)
---
diff --git a/src/compositor/meta-window-actor.c b/src/compositor/meta-window-actor.c
index 0202fda..58a2d81 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;
 }
 
 /**


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]