mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-26 15:45:58 +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,8 +928,17 @@ 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) {
|
||||||
// windows should be valid, insallah
|
// windows should be valid, insallah
|
||||||
|
|
Loading…
Reference in a new issue