diff options
| author | Vaxry <43317083+vaxerski@users.noreply.github.com> | 2025-12-05 14:16:22 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-12-05 14:16:22 +0000 |
| commit | 9264436f35e2c4e94adfdf2a8ea23a346ace3a65 (patch) | |
| tree | 9fe48ff4728060445e655d8a3b528999fd124ff8 /src/events/Windows.cpp | |
| parent | d5c52ef58e57b371a9df8fd4404c5d55a1b26f34 (diff) | |
desktop: rewrite reserved area handling + improve tests (#12383)
Diffstat (limited to 'src/events/Windows.cpp')
| -rw-r--r-- | src/events/Windows.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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 |
