mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-26 07:05:58 +01:00
Added moveoutofgroup dispatcher
This commit is contained in:
parent
55b412e0f4
commit
18ed73f091
2 changed files with 19 additions and 0 deletions
|
@ -62,6 +62,7 @@ CKeybindManager::CKeybindManager() {
|
|||
m_mDispatchers["focuscurrentorlast"] = focusCurrentOrLast;
|
||||
m_mDispatchers["lockgroups"] = lockGroups;
|
||||
m_mDispatchers["moveintogroup"] = moveIntoGroup;
|
||||
m_mDispatchers["moveoutofgroup"] = moveOutOfGroup;
|
||||
|
||||
m_tScrollTimer.reset();
|
||||
}
|
||||
|
@ -2080,3 +2081,20 @@ void CKeybindManager::moveIntoGroup(std::string args) {
|
|||
|
||||
PWINDOWINDIR->insertWindowToGroup(PWINDOW);
|
||||
}
|
||||
|
||||
void CKeybindManager::moveOutOfGroup(std::string args) {
|
||||
const auto PWINDOW = g_pCompositor->m_pLastWindow;
|
||||
|
||||
if (!PWINDOW || !PWINDOW->m_sGroupData.pNextWindow)
|
||||
return;
|
||||
|
||||
g_pLayoutManager->getCurrentLayout()->onWindowRemoved(PWINDOW);
|
||||
|
||||
const auto GROUPSLOCKEDPREV = g_pKeybindManager->m_bGroupsLocked;
|
||||
|
||||
g_pKeybindManager->m_bGroupsLocked = true;
|
||||
|
||||
g_pLayoutManager->getCurrentLayout()->onWindowCreated(PWINDOW);
|
||||
|
||||
g_pKeybindManager->m_bGroupsLocked = GROUPSLOCKEDPREV;
|
||||
}
|
||||
|
|
|
@ -137,6 +137,7 @@ class CKeybindManager {
|
|||
static void bringActiveToTop(std::string);
|
||||
static void lockGroups(std::string);
|
||||
static void moveIntoGroup(std::string);
|
||||
static void moveOutOfGroup(std::string);
|
||||
|
||||
friend class CCompositor;
|
||||
friend class CInputManager;
|
||||
|
|
Loading…
Reference in a new issue