mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-26 18:25:59 +01:00
master: fix movewindow across monitors (#3628)
This commit is contained in:
parent
bb9d0aed5b
commit
bab2f6a664
1 changed files with 10 additions and 1 deletions
|
@ -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]);
|
||||||
|
|
||||||
|
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);
|
switchWindows(pWindow, PWINDOW2);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CHyprMasterLayout::switchWindows(CWindow* pWindow, CWindow* pWindow2) {
|
void CHyprMasterLayout::switchWindows(CWindow* pWindow, CWindow* pWindow2) {
|
||||||
|
|
Loading…
Reference in a new issue