keybinds: handle monitor change in moveWindowIntoGroup (#7030)

modified:   src/managers/KeybindManager.cpp
This commit is contained in:
MightyPlaza 2024-07-24 18:00:25 +00:00 committed by GitHub
parent 3e543d2ce8
commit a0be3de0e8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2478,6 +2478,11 @@ void CKeybindManager::moveWindowIntoGroup(PHLWINDOW pWindow, PHLWINDOW pWindowIn
g_pLayoutManager->getCurrentLayout()->onWindowRemoved(pWindow); // This removes groupped property! 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"); static auto USECURRPOS = CConfigValue<Hyprlang::INT>("group:insert_after_current");
pWindowInDirection = *USECURRPOS ? pWindowInDirection : pWindowInDirection->getGroupTail(); pWindowInDirection = *USECURRPOS ? pWindowInDirection : pWindowInDirection->getGroupTail();