Skip to content
This repository was archived by the owner on Nov 20, 2025. It is now read-only.

Commit ab34036

Browse files
committed
blur/fake-blur: check whether fake blur texture exists in BlurEffect::prePaintWindow
1 parent b182780 commit ab34036

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/blur.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -299,12 +299,12 @@ bool BlurEffect::hasFakeBlur(EffectWindow *w)
299299
{
300300
if (!m_settings.fakeBlur.enable) {
301301
return false;
302-
} else if (!m_settings.fakeBlur.disableWhenWindowBehind) {
303-
return true;
304302
}
305303

306-
if (auto it = m_windows.find(w); it != m_windows.end()) {
307-
return !it->second.hasWindowBehind;
304+
if (m_settings.fakeBlur.disableWhenWindowBehind) {
305+
if (auto it = m_windows.find(w); it != m_windows.end()) {
306+
return !it->second.hasWindowBehind;
307+
}
308308
}
309309

310310
return true;
@@ -472,7 +472,7 @@ void BlurEffect::prePaintWindow(EffectWindow *w, WindowPrePaintData &data, std::
472472
// in case this window has regions to be blurred
473473
const QRegion blurArea = blurRegion(w).translated(w->pos().toPoint());
474474

475-
bool fakeBlur = hasFakeBlur(w) && !blurArea.isEmpty();
475+
bool fakeBlur = hasFakeBlur(w) && m_fakeBlurTextures.contains(m_currentScreen) && !blurArea.isEmpty();
476476
if (fakeBlur) {
477477
data.opaque += blurArea;
478478

0 commit comments

Comments
 (0)