mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-04 22:22:00 -07:00
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
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user