diff options
author | MightyPlaza <[email protected]> | 2024-07-24 18:00:25 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2024-07-24 20:00:25 +0200 |
commit | a0be3de0e89f42b98d00bf0d87ad10af843d58d6 (patch) | |
tree | eda7deef4bf85367d946c7b5bd64720b0b850505 | |
parent | 3e543d2ce8ba64abb4d226dbb88c4513474501cf (diff) | |
download | Hyprland-a0be3de0e89f42b98d00bf0d87ad10af843d58d6.tar.gz Hyprland-a0be3de0e89f42b98d00bf0d87ad10af843d58d6.zip |
keybinds: handle monitor change in moveWindowIntoGroup (#7030)
modified: src/managers/KeybindManager.cpp
-rw-r--r-- | src/managers/KeybindManager.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp index ed76575a..4232ea64 100644 --- a/src/managers/KeybindManager.cpp +++ b/src/managers/KeybindManager.cpp @@ -2478,6 +2478,11 @@ void CKeybindManager::moveWindowIntoGroup(PHLWINDOW pWindow, PHLWINDOW pWindowIn g_pLayoutManager->getCurrentLayout()->onWindowRemoved(pWindow); // This removes groupped property! + if (pWindow->m_iMonitorID != pWindowInDirection->m_iMonitorID) { + pWindow->moveToWorkspace(pWindowInDirection->m_pWorkspace); + pWindow->m_iMonitorID = pWindowInDirection->m_iMonitorID; + } + static auto USECURRPOS = CConfigValue<Hyprlang::INT>("group:insert_after_current"); pWindowInDirection = *USECURRPOS ? pWindowInDirection : pWindowInDirection->getGroupTail(); |