From a0712274ff3999913de6d7eaf45b1fe9ee333594 Mon Sep 17 00:00:00 2001 From: Yuxuan Shui Date: Thu, 24 Oct 2019 19:30:11 +0100 Subject: [PATCH] win: fix transparency detection for windows without a WM frame Ping #233 Signed-off-by: Yuxuan Shui --- src/win.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/win.c b/src/win.c index e65c0a0..1e4a0d9 100644 --- a/src/win.c +++ b/src/win.c @@ -552,6 +552,11 @@ winmode_t win_calc_mode(const struct managed_win *w) { } if (win_has_alpha(w)) { + if (w->client_win == XCB_NONE) { + // This is a window not managed by the WM, and it has alpha, + // so it's transparent. No need to check WM frame. + return WMODE_TRANS; + } // The WM window has alpha if (win_client_has_alpha(w)) { // The client window also has alpha, the entire window is