win: fix transparency detection for windows without a WM frame

Ping #233

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui 2019-10-24 19:30:11 +01:00
parent c920082bff
commit a0712274ff
No known key found for this signature in database
GPG Key ID: 37C999F617EA1A47
1 changed files with 5 additions and 0 deletions

View File

@ -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