From 9264436f35e2c4e94adfdf2a8ea23a346ace3a65 Mon Sep 17 00:00:00 2001 From: Vaxry <43317083+vaxerski@users.noreply.github.com> Date: Fri, 5 Dec 2025 14:16:22 +0000 Subject: desktop: rewrite reserved area handling + improve tests (#12383) --- src/events/Windows.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/events/Windows.cpp') diff --git a/src/events/Windows.cpp b/src/events/Windows.cpp index 9a1c07d9..6b9ba1b9 100644 --- a/src/events/Windows.cpp +++ b/src/events/Windows.cpp @@ -396,8 +396,8 @@ void Events::listener_mapWindow(void* owner, void* data) { } if (PWINDOW->m_ruleApplicator->static_.center) { - auto RESERVEDOFFSET = (PMONITOR->m_reservedTopLeft - PMONITOR->m_reservedBottomRight) / 2.f; - *PWINDOW->m_realPosition = PMONITOR->middle() - PWINDOW->m_realSize->goal() / 2.f + RESERVEDOFFSET; + const auto WORKAREA = PMONITOR->logicalBoxMinusReserved(); + *PWINDOW->m_realPosition = WORKAREA.middle() - PWINDOW->m_realSize->goal() / 2.f; } // set the pseudo size to the GOAL of our current size -- cgit v1.2.3