From 93f89b8603730ab4187080353f945c116c3ec9df Mon Sep 17 00:00:00 2001 From: Yuxuan Shui Date: Wed, 11 Mar 2020 21:00:47 +0000 Subject: [PATCH] win: fix transparency detection Previously, when frame_opacity is < 1, we consider windows with frames to be WIN_FRAME_TRANS immediately, without even checking if the body of the window is transparent. The result is a transparent window is seen as a opaque window with only a transparent frame, causing its background to not be blurred. Fixes #211 --- src/win.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/win.c b/src/win.c index ac321aa..25d9367 100644 --- a/src/win.c +++ b/src/win.c @@ -553,9 +553,6 @@ winmode_t win_calc_mode(const struct managed_win *w) { if (w->opacity < 1.0) { return WMODE_TRANS; } - if (w->frame_opacity != 1.0 && win_has_frame(w)) { - return WMODE_FRAME_TRANS; - } if (win_has_alpha(w)) { if (w->client_win == XCB_NONE) { @@ -578,6 +575,10 @@ winmode_t win_calc_mode(const struct managed_win *w) { // consider the window solid } + if (w->frame_opacity != 1.0 && win_has_frame(w)) { + return WMODE_FRAME_TRANS; + } + // log_trace("Window %#010x(%s) is solid", w->client_win, w->name); return WMODE_SOLID; }