summaryrefslogtreecommitdiff
path: root/src/managers/animation/DesktopAnimationManager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/managers/animation/DesktopAnimationManager.cpp')
-rw-r--r--src/managers/animation/DesktopAnimationManager.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/managers/animation/DesktopAnimationManager.cpp b/src/managers/animation/DesktopAnimationManager.cpp
index 8a340554..a56aa2f9 100644
--- a/src/managers/animation/DesktopAnimationManager.cpp
+++ b/src/managers/animation/DesktopAnimationManager.cpp
@@ -408,10 +408,11 @@ void CDesktopAnimationManager::animationSlide(PHLWINDOW pWindow, std::string for
const auto MIDPOINT = GOALPOS + GOALSIZE / 2.f;
// check sides it touches
- const bool DISPLAYLEFT = STICKS(pWindow->m_position.x, PMONITOR->m_position.x + PMONITOR->m_reservedTopLeft.x);
- const bool DISPLAYRIGHT = STICKS(pWindow->m_position.x + pWindow->m_size.x, PMONITOR->m_position.x + PMONITOR->m_size.x - PMONITOR->m_reservedBottomRight.x);
- const bool DISPLAYTOP = STICKS(pWindow->m_position.y, PMONITOR->m_position.y + PMONITOR->m_reservedTopLeft.y);
- const bool DISPLAYBOTTOM = STICKS(pWindow->m_position.y + pWindow->m_size.y, PMONITOR->m_position.y + PMONITOR->m_size.y - PMONITOR->m_reservedBottomRight.y);
+ const auto MONITOR_WORKAREA = PMONITOR->logicalBoxMinusReserved();
+ const bool DISPLAYLEFT = STICKS(pWindow->m_position.x, MONITOR_WORKAREA.x);
+ const bool DISPLAYRIGHT = STICKS(pWindow->m_position.x + pWindow->m_size.x, MONITOR_WORKAREA.x + MONITOR_WORKAREA.w);
+ const bool DISPLAYTOP = STICKS(pWindow->m_position.y, MONITOR_WORKAREA.y);
+ const bool DISPLAYBOTTOM = STICKS(pWindow->m_position.y + pWindow->m_size.y, MONITOR_WORKAREA.y + MONITOR_WORKAREA.h);
if (DISPLAYBOTTOM && DISPLAYTOP) {
if (DISPLAYLEFT && DISPLAYRIGHT) {