dwindle: add proper movement for window move binds

ditches the "movewindow = swapwindow" mechanism. Fixes #2804
This commit is contained in:
vaxerski
2023-09-04 15:34:07 +02:00
parent 69439871e6
commit 9f3a64481e
6 changed files with 76 additions and 18 deletions

View File

@@ -743,6 +743,15 @@ SWindowRenderLayoutHints CHyprMasterLayout::requestRenderHints(CWindow* pWindow)
return hints; // master doesnt have any hints
}
void CHyprMasterLayout::moveWindowTo(CWindow* pWindow, const std::string& dir) {
if (!isDirection(dir))
return;
const auto PWINDOW2 = g_pCompositor->getWindowInDirection(pWindow, dir[0]);
switchWindows(pWindow, PWINDOW2);
}
void CHyprMasterLayout::switchWindows(CWindow* pWindow, CWindow* pWindow2) {
// windows should be valid, insallah