Skip to content

Commit 54352fc

Browse files
committed
fix(panel): scope blur-reveal gate to detached panels so attached panels keep blur
1 parent 710d29a commit 54352fc

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

src/shell/panel/panel_manager.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1569,15 +1569,6 @@ void PanelManager::applyPanelCompositorBlur() {
15691569
return;
15701570
}
15711571

1572-
// The blur region is not opacity-aware: while the panel is still mostly translucent a
1573-
// submitted region would show through as a blurred blob, so keep it cleared until the
1574-
// panel is opaque enough. This works the same during both fade in/out.
1575-
const float kBlurRevealThreshold = 0.6f;
1576-
if (m_detachedRevealProgress < kBlurRevealThreshold) {
1577-
m_surface->clearBlurRegion();
1578-
return;
1579-
}
1580-
15811572
int bx = m_panelInsetX;
15821573
int by = m_panelInsetY;
15831574
int bw = static_cast<int>(m_panelVisualWidth);
@@ -1588,6 +1579,15 @@ void PanelManager::applyPanelCompositorBlur() {
15881579
}
15891580

15901581
if (!m_attachedToBar) {
1582+
// The blur region is not opacity-aware: while the detached panel is still mostly
1583+
// translucent a submitted region would show through as a blurred blob, so keep it
1584+
// cleared until the panel is opaque enough. This works the same during both fade in/out.
1585+
const float kBlurRevealThreshold = 0.6f;
1586+
if (m_detachedRevealProgress < kBlurRevealThreshold) {
1587+
m_surface->clearBlurRegion();
1588+
return;
1589+
}
1590+
15911591
const float progress = std::clamp(m_detachedRevealProgress, 0.0f, 1.0f);
15921592
const float s = 1.0f - 0.05f * (1.0f - progress);
15931593
const int scaledW = static_cast<int>(std::lround(static_cast<float>(bw) * s));

0 commit comments

Comments
 (0)