switch to using window->middle()

This commit is contained in:
dtop 2023-07-11 13:48:57 +02:00
parent 1b0b11e209
commit d6e850d3f5

View file

@ -775,7 +775,7 @@ void CKeybindManager::changeworkspace(std::string args) {
g_pCompositor->focusWindow(PNEWWINDOW); g_pCompositor->focusWindow(PNEWWINDOW);
if (PNEWWINDOW) if (PNEWWINDOW)
g_pCompositor->warpCursorTo(PNEWWINDOW->m_vRealPosition.goalv() + PNEWWINDOW->m_vRealSize.goalv() / 2.f); g_pCompositor->warpCursorTo(PNEWWINDOW->middle());
else else
g_pCompositor->warpCursorTo(PMONITORWORKSPACEOWNER->vecPosition + PMONITORWORKSPACEOWNER->vecSize / 2.f); g_pCompositor->warpCursorTo(PMONITORWORKSPACEOWNER->vecPosition + PMONITORWORKSPACEOWNER->vecSize / 2.f);