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
This commit is contained in:
parent
d757d45d1e
commit
93f89b8603
|
@ -553,9 +553,6 @@ winmode_t win_calc_mode(const struct managed_win *w) {
|
||||||
if (w->opacity < 1.0) {
|
if (w->opacity < 1.0) {
|
||||||
return WMODE_TRANS;
|
return WMODE_TRANS;
|
||||||
}
|
}
|
||||||
if (w->frame_opacity != 1.0 && win_has_frame(w)) {
|
|
||||||
return WMODE_FRAME_TRANS;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (win_has_alpha(w)) {
|
if (win_has_alpha(w)) {
|
||||||
if (w->client_win == XCB_NONE) {
|
if (w->client_win == XCB_NONE) {
|
||||||
|
@ -578,6 +575,10 @@ winmode_t win_calc_mode(const struct managed_win *w) {
|
||||||
// consider the window solid
|
// 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);
|
// log_trace("Window %#010x(%s) is solid", w->client_win, w->name);
|
||||||
return WMODE_SOLID;
|
return WMODE_SOLID;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue