mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-01 12:41:55 -07:00
master: fix movewindow across monitors (#3628)
This commit is contained in:
@@ -928,7 +928,16 @@ void CHyprMasterLayout::moveWindowTo(CWindow* pWindow, const std::string& dir) {
|
|||||||
|
|
||||||
const auto PWINDOW2 = g_pCompositor->getWindowInDirection(pWindow, dir[0]);
|
const auto PWINDOW2 = g_pCompositor->getWindowInDirection(pWindow, dir[0]);
|
||||||
|
|
||||||
switchWindows(pWindow, PWINDOW2);
|
if (pWindow->m_iWorkspaceID != PWINDOW2->m_iWorkspaceID) {
|
||||||
|
// if different monitors, send to monitor
|
||||||
|
onWindowRemovedTiling(pWindow);
|
||||||
|
pWindow->moveToWorkspace(PWINDOW2->m_iWorkspaceID);
|
||||||
|
pWindow->m_iMonitorID = PWINDOW2->m_iMonitorID;
|
||||||
|
onWindowCreatedTiling(pWindow);
|
||||||
|
} else {
|
||||||
|
// if same monitor, switch windows
|
||||||
|
switchWindows(pWindow, PWINDOW2);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CHyprMasterLayout::switchWindows(CWindow* pWindow, CWindow* pWindow2) {
|
void CHyprMasterLayout::switchWindows(CWindow* pWindow, CWindow* pWindow2) {
|
||||||
|
Reference in New Issue
Block a user