mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-01 12:41:55 -07:00
dwindle: add proper movement for window move binds
ditches the "movewindow = swapwindow" mechanism. Fixes #2804
This commit is contained in:
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user