[PATCH 32/37] mi: Treat paintable-but-not-mapped windows as transparent too

Adam Jackson ajax at redhat.com
Wed Oct 8 08:04:56 PDT 2014


It's okay to remove the ifdef here; the bits are defined in the Window
struct regardless, and if composite isn't built they'll just never be
set to Manual.

Signed-off-by: Adam Jackson <ajax at redhat.com>
---
 mi/mivaltree.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/mi/mivaltree.c b/mi/mivaltree.c
index 760ee3a..1492ad0 100644
--- a/mi/mivaltree.c
+++ b/mi/mivaltree.c
@@ -164,14 +164,16 @@ miShapedWindowIn(RegionPtr universe, RegionPtr bounding,
 
 /*
  * Manual redirected windows are treated as transparent; they do not obscure
- * siblings or parent windows
+ * siblings or parent windows.  Likewise windows that are paintable but not
+ * mapped.
  */
 
-#ifdef COMPOSITE
-#define TreatAsTransparent(w)	((w)->redirectDraw == RedirectDrawManual)
-#else
-#define TreatAsTransparent(w)	FALSE
-#endif
+static Bool
+TreatAsTransparent(WindowPtr w)
+{
+    return (w->redirectDraw == RedirectDrawManual) ||
+        (w->paintable && !w->mapped);
+}
 
 #define HasParentRelativeBorder(w) (!(w)->borderIsPixel && \
 				    HasBorder(w) && \
-- 
1.9.3



More information about the xorg-devel mailing list