focus: make cursor follow movewindow (#2374)

This commit is contained in:
Jeremy Huang 2023-05-27 03:16:50 -07:00 committed by GitHub
parent 5f4659afef
commit 8afc2f45c7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1138,7 +1138,7 @@ void CKeybindManager::moveActiveTo(std::string args) {
const auto PWINDOWTOCHANGETO = g_pCompositor->getWindowInDirection(PLASTWINDOW, arg);
if (PWINDOWTOCHANGETO && PWINDOWTOCHANGETO->m_iWorkspaceID == PLASTWINDOW->m_iWorkspaceID) {
g_pLayoutManager->getCurrentLayout()->switchWindows(PLASTWINDOW, PWINDOWTOCHANGETO);
g_pCompositor->warpCursorTo(PLASTWINDOW->m_vRealPosition.vec() + PLASTWINDOW->m_vRealSize.vec() / 2.0);
g_pCompositor->warpCursorTo(PWINDOWTOCHANGETO->m_vRealPosition.vec() + PWINDOWTOCHANGETO->m_vRealSize.vec() / 2.0);
return;
}