diff options
| author | Vaxry <vaxry@vaxry.net> | 2026-02-24 11:33:21 +0000 |
|---|---|---|
| committer | Vaxry <vaxry@vaxry.net> | 2026-02-24 11:33:21 +0000 |
| commit | 5a80bc120ab7c260e3084c3284a0411ca513c62c (patch) | |
| tree | d7035569d469cb19009431d968b8e46ee979d378 /src/layout/algorithm/tiled/scrolling/ScrollingAlgorithm.cpp | |
| parent | a248805132a8252d6bf3007931810c44ee5e3358 (diff) | |
algo/scrolling: fix crashes on destroying ws
ref #13324
Diffstat (limited to 'src/layout/algorithm/tiled/scrolling/ScrollingAlgorithm.cpp')
| -rw-r--r-- | src/layout/algorithm/tiled/scrolling/ScrollingAlgorithm.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/layout/algorithm/tiled/scrolling/ScrollingAlgorithm.cpp b/src/layout/algorithm/tiled/scrolling/ScrollingAlgorithm.cpp index 5b696113..247795ed 100644 --- a/src/layout/algorithm/tiled/scrolling/ScrollingAlgorithm.cpp +++ b/src/layout/algorithm/tiled/scrolling/ScrollingAlgorithm.cpp @@ -415,7 +415,7 @@ SP<SColumnData> SScrollingData::atCenter() { } void SScrollingData::recalculate(bool forceInstant) { - if (algorithm->m_parent->space()->workspace()->m_hasFullscreenWindow) + if (!algorithm->m_parent->space()->workspace() || algorithm->m_parent->space()->workspace()->m_hasFullscreenWindow) return; static const auto PFSONONE = CConfigValue<Hyprlang::INT>("scrolling:fullscreen_on_one_column"); @@ -1404,6 +1404,11 @@ eScrollDirection CScrollingAlgorithm::getDynamicDirection() { CBox CScrollingAlgorithm::usableArea() { CBox box = m_parent->space()->workArea(); + + // doesn't matter, this happens when this algo is about to be destroyed + if (!m_parent->space()->workspace()) + return box; + box.translate(-m_parent->space()->workspace()->m_monitor->m_position); return box; } |
