fix opening of layer 3 programs moving scrolling view

This commit is contained in:
erstarr 2026-04-04 06:45:21 +02:00
parent 91b3bfac92
commit 8814b100d5
4 changed files with 5 additions and 3 deletions

View file

@ -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);
}
}
}

View file

@ -811,7 +811,7 @@ void CScrollingAlgorithm::recalculate(std::optional<eRecalculateReason> 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);
}
}

View file

@ -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,
};

View file

@ -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)