mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-09-20 10:18:25 +00:00
dwindle: add proper movement for window move binds
ditches the "movewindow = swapwindow" mechanism. Fixes #2804
This commit is contained in:
@@ -1160,9 +1160,9 @@ void CKeybindManager::moveActiveTo(std::string args) {
|
||||
|
||||
// If the window to change to is on the same workspace, switch them
|
||||
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(PWINDOWTOCHANGETO->m_vRealPosition.vec() + PWINDOWTOCHANGETO->m_vRealSize.vec() / 2.0);
|
||||
if (PWINDOWTOCHANGETO) {
|
||||
g_pLayoutManager->getCurrentLayout()->moveWindowTo(PLASTWINDOW, args);
|
||||
g_pCompositor->warpCursorTo(PLASTWINDOW->m_vRealPosition.goalv() + PLASTWINDOW->m_vRealSize.goalv() / 2.0);
|
||||
return;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user