diff options
author | thejch <[email protected]> | 2024-03-23 15:14:50 -0700 |
---|---|---|
committer | GitHub <[email protected]> | 2024-03-23 22:14:50 +0000 |
commit | c7fbea3368452c34c47a4a634e642de6cd4090cb (patch) | |
tree | 7062602a26df7d2fe53ceecaa517f0a304aa194b /src/render/Renderer.cpp | |
parent | 295128ab2a3c4ad1715bb7cd926880316f00e667 (diff) | |
download | Hyprland-c7fbea3368452c34c47a4a634e642de6cd4090cb.tar.gz Hyprland-c7fbea3368452c34c47a4a634e642de6cd4090cb.zip |
animations: Fix animation issue in focusworkspaceoncurrentmonitor (#5202)
* dont render when workspace offset
* add guard
* can remove useless code now if workspace offset is not taken into account
* clang-format
* when special workspace is moved, set anim to move
* add offset back
* make it a configurable option because some folks apparently can't align their monitors correctly and may not want this feature😔
* remove config option
Diffstat (limited to 'src/render/Renderer.cpp')
-rw-r--r-- | src/render/Renderer.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp index 88035112..7f83c429 100644 --- a/src/render/Renderer.cpp +++ b/src/render/Renderer.cpp @@ -217,7 +217,7 @@ bool CHyprRenderer::shouldRenderWindow(CWindow* pWindow, CMonitor* pMonitor, CWo } } - if (pWindow->m_iWorkspaceID == pWorkspace->m_iID) + if (pWindow->m_iWorkspaceID == pWorkspace->m_iID && pWorkspace->m_iMonitorID == pMonitor->ID) return true; // if not, check if it maybe is active on a different monitor. @@ -228,9 +228,11 @@ bool CHyprRenderer::shouldRenderWindow(CWindow* pWindow, CMonitor* pMonitor, CWo return true; if (pWindow->m_vRealPosition.isBeingAnimated()) { + if (PWINDOWWORKSPACE && !PWINDOWWORKSPACE->m_bIsSpecialWorkspace && PWINDOWWORKSPACE->m_vRenderOffset.isBeingAnimated()) + return false; // render window if window and monitor intersect // (when moving out of or through a monitor) - CBox windowBox = {pWindow->m_vRealPosition.value(), pWindow->m_vRealSize.value()}; + CBox windowBox = pWindow->getFullWindowBoundingBox(); const CBox monitorBox = {pMonitor->vecPosition, pMonitor->vecSize}; if (!windowBox.intersection(monitorBox).empty()) return true; |