Skip to content

Commit

Permalink
renderer: fix fade out on silent moves to special
Browse files Browse the repository at this point in the history
  • Loading branch information
vaxerski committed Feb 6, 2025
1 parent acbcf0c commit 54441e0
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions src/render/Renderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,10 @@ void CHyprRenderer::renderWorkspaceWindows(PHLMONITOR pMonitor, PHLWORKSPACE pWo
if (w->m_bIsFloating)
continue; // floating are in the second pass

if (pWorkspace->m_bIsSpecialWorkspace != w->onSpecialWorkspace())
// some things may force us to ignore the special/not special disparity
const bool IGNORE_SPECIAL_CHECK = w->m_iMonitorMovedFrom != -1 && (w->m_pWorkspace && !w->m_pWorkspace->isVisible());

if (!IGNORE_SPECIAL_CHECK && pWorkspace->m_bIsSpecialWorkspace != w->onSpecialWorkspace())
continue;

// render active window after all others of this pass
Expand All @@ -390,11 +393,14 @@ void CHyprRenderer::renderWorkspaceWindows(PHLMONITOR pMonitor, PHLWORKSPACE pWo

// render the bad boy
renderWindow(w.lock(), pMonitor, time, true, RENDER_PASS_MAIN);
w.reset();
}

if (lastWindow)
renderWindow(lastWindow, pMonitor, time, true, RENDER_PASS_MAIN);

lastWindow.reset();

// Non-floating popup
for (auto& w : windows) {
if (!w)
Expand All @@ -403,7 +409,10 @@ void CHyprRenderer::renderWorkspaceWindows(PHLMONITOR pMonitor, PHLWORKSPACE pWo
if (w->m_bIsFloating)
continue; // floating are in the second pass

if (pWorkspace->m_bIsSpecialWorkspace != w->onSpecialWorkspace())
// some things may force us to ignore the special/not special disparity
const bool IGNORE_SPECIAL_CHECK = w->m_iMonitorMovedFrom != -1 && (w->m_pWorkspace && !w->m_pWorkspace->isVisible());

if (!IGNORE_SPECIAL_CHECK && pWorkspace->m_bIsSpecialWorkspace != w->onSpecialWorkspace())
continue;

// render the bad boy
Expand All @@ -419,7 +428,10 @@ void CHyprRenderer::renderWorkspaceWindows(PHLMONITOR pMonitor, PHLWORKSPACE pWo
if (!w->m_bIsFloating || w->m_bPinned)
continue;

if (pWorkspace->m_bIsSpecialWorkspace != w->onSpecialWorkspace())
// some things may force us to ignore the special/not special disparity
const bool IGNORE_SPECIAL_CHECK = w->m_iMonitorMovedFrom != -1 && (w->m_pWorkspace && !w->m_pWorkspace->isVisible());

if (!IGNORE_SPECIAL_CHECK && pWorkspace->m_bIsSpecialWorkspace != w->onSpecialWorkspace())
continue;

if (pWorkspace->m_bIsSpecialWorkspace && w->m_pMonitor != pWorkspace->m_pMonitor)
Expand Down

0 comments on commit 54441e0

Please sign in to comment.