diff --git a/src/layout/LayoutManager.cpp b/src/layout/LayoutManager.cpp index 51e85be93..181fbb54f 100644 --- a/src/layout/LayoutManager.cpp +++ b/src/layout/LayoutManager.cpp @@ -363,7 +363,7 @@ void CLayoutManager::invalidateMonitorGeometries(PHLMONITOR m) { for (const auto& ws : g_pCompositor->getWorkspaces()) { if (ws && ws->m_monitor == m) { ws->m_space->recheckWorkArea(); - ws->m_space->recalculate(); + ws->m_space->recalculate(RECALCULATE_REASON_INVALIDATE_MONITOR_GEOMETRIES); } } } diff --git a/src/layout/algorithm/tiled/scrolling/ScrollingAlgorithm.cpp b/src/layout/algorithm/tiled/scrolling/ScrollingAlgorithm.cpp index 0ae147f3a..53e8e32ce 100644 --- a/src/layout/algorithm/tiled/scrolling/ScrollingAlgorithm.cpp +++ b/src/layout/algorithm/tiled/scrolling/ScrollingAlgorithm.cpp @@ -811,7 +811,7 @@ void CScrollingAlgorithm::recalculate(std::optional reason) // TODO: erstarr Maybe do smt about this mess // RECALCULATE_REASON_WORKSPACE_CHANGE, RECALCULATE_REASON_SPECIAL_WORKSPACE_TOGGLE => guard against scrolling view move when switching workspaces when target is scrolling (special or not) // RECALCULATE_REASON_HYPRCTL_KEYWORD => guard against `hyprctl keyword` commands moving scrolling view - if (reason != RECALCULATE_REASON_WORKSPACE_CHANGE && reason != RECALCULATE_REASON_SPECIAL_WORKSPACE_TOGGLE && reason != RECALCULATE_REASON_HYPRCTL_KEYWORD && reason != RECALCULATE_REASON_TOGGLE_FULLSCREEN) + if (reason != RECALCULATE_REASON_WORKSPACE_CHANGE && reason != RECALCULATE_REASON_SPECIAL_WORKSPACE_TOGGLE && reason != RECALCULATE_REASON_HYPRCTL_KEYWORD && reason != RECALCULATE_REASON_TOGGLE_FULLSCREEN && reason != RECALCULATE_REASON_INVALIDATE_MONITOR_GEOMETRIES && reason != RECALCULATE_REASON_RENDER_MOINTOR) focusOnInput(Desktop::focusState()->window()->layoutTarget(), INPUT_MODE_HARD); } } diff --git a/src/layout/space/Space.hpp b/src/layout/space/Space.hpp index db0deb55b..13749a479 100644 --- a/src/layout/space/Space.hpp +++ b/src/layout/space/Space.hpp @@ -18,6 +18,8 @@ namespace Layout { RECALCULATE_REASON_SPECIAL_WORKSPACE_TOGGLE, RECALCULATE_REASON_HYPRCTL_KEYWORD, RECALCULATE_REASON_TOGGLE_FULLSCREEN, + RECALCULATE_REASON_INVALIDATE_MONITOR_GEOMETRIES, + RECALCULATE_REASON_RENDER_MOINTOR, }; diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp index 6800c1857..e9749ca90 100644 --- a/src/render/Renderer.cpp +++ b/src/render/Renderer.cpp @@ -1956,7 +1956,7 @@ void IHyprRenderer::renderMonitor(PHLMONITOR pMonitor, bool commit) { if (pMonitor->m_scheduledRecalc) { pMonitor->m_scheduledRecalc = false; if (pMonitor->m_activeWorkspace) // might be missing (mirror) - pMonitor->m_activeWorkspace->m_space->recalculate(); + pMonitor->m_activeWorkspace->m_space->recalculate(Layout::RECALCULATE_REASON_RENDER_MOINTOR); } if (!pMonitor->m_output->needsFrame && pMonitor->m_forceFullFrames == 0)