windowrules: fix center

fixes #4934
This commit is contained in:
Vaxry 2024-03-03 00:22:40 +00:00
parent acf0b536a6
commit 689fced8b9

View file

@ -435,7 +435,7 @@ void Events::listener_mapWindow(void* owner, void* data) {
if (ARGS[1] == "1") if (ARGS[1] == "1")
RESERVEDOFFSET = (PMONITOR->vecReservedTopLeft - PMONITOR->vecReservedBottomRight) / 2.f; RESERVEDOFFSET = (PMONITOR->vecReservedTopLeft - PMONITOR->vecReservedBottomRight) / 2.f;
PWINDOW->m_vRealPosition = PMONITOR->middle() - PWINDOW->m_vRealSize.value() / 2.f + RESERVEDOFFSET; PWINDOW->m_vRealPosition = PMONITOR->middle() - PWINDOW->m_vRealSize.goal() / 2.f + RESERVEDOFFSET;
} }
} }