mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-23 00:05:59 +01:00
Added moveintogroup dispatcher
This commit is contained in:
parent
3bfaeacf7d
commit
55b412e0f4
2 changed files with 28 additions and 2 deletions
|
@ -61,6 +61,7 @@ CKeybindManager::CKeybindManager() {
|
||||||
m_mDispatchers["focusurgentorlast"] = focusUrgentOrLast;
|
m_mDispatchers["focusurgentorlast"] = focusUrgentOrLast;
|
||||||
m_mDispatchers["focuscurrentorlast"] = focusCurrentOrLast;
|
m_mDispatchers["focuscurrentorlast"] = focusCurrentOrLast;
|
||||||
m_mDispatchers["lockgroups"] = lockGroups;
|
m_mDispatchers["lockgroups"] = lockGroups;
|
||||||
|
m_mDispatchers["moveintogroup"] = moveIntoGroup;
|
||||||
|
|
||||||
m_tScrollTimer.reset();
|
m_tScrollTimer.reset();
|
||||||
}
|
}
|
||||||
|
@ -2056,3 +2057,26 @@ void CKeybindManager::lockGroups(std::string args) {
|
||||||
g_pKeybindManager->m_bGroupsLocked = false;
|
g_pKeybindManager->m_bGroupsLocked = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CKeybindManager::moveIntoGroup(std::string args) {
|
||||||
|
char arg = args[0];
|
||||||
|
|
||||||
|
if (!isDirection(args)) {
|
||||||
|
Debug::log(ERR, "Cannot move into group in direction %c, unsupported direction. Supported: l,r,u/t,d/b", arg);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const auto PWINDOW = g_pCompositor->m_pLastWindow;
|
||||||
|
|
||||||
|
if (!PWINDOW || PWINDOW->m_bIsFloating)
|
||||||
|
return;
|
||||||
|
|
||||||
|
const auto PWINDOWINDIR = g_pCompositor->getWindowInDirection(PWINDOW, arg);
|
||||||
|
|
||||||
|
if (!PWINDOWINDIR || !PWINDOWINDIR->m_sGroupData.pNextWindow)
|
||||||
|
return;
|
||||||
|
|
||||||
|
g_pLayoutManager->getCurrentLayout()->onWindowRemoved(PWINDOW);
|
||||||
|
|
||||||
|
PWINDOWINDIR->insertWindowToGroup(PWINDOW);
|
||||||
|
}
|
||||||
|
|
|
@ -25,7 +25,8 @@ struct SKeybind {
|
||||||
bool shadowed = false;
|
bool shadowed = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
enum eFocusWindowMode {
|
enum eFocusWindowMode
|
||||||
|
{
|
||||||
MODE_CLASS_REGEX = 0,
|
MODE_CLASS_REGEX = 0,
|
||||||
MODE_TITLE_REGEX,
|
MODE_TITLE_REGEX,
|
||||||
MODE_ADDRESS,
|
MODE_ADDRESS,
|
||||||
|
@ -135,6 +136,7 @@ class CKeybindManager {
|
||||||
static void mouse(std::string);
|
static void mouse(std::string);
|
||||||
static void bringActiveToTop(std::string);
|
static void bringActiveToTop(std::string);
|
||||||
static void lockGroups(std::string);
|
static void lockGroups(std::string);
|
||||||
|
static void moveIntoGroup(std::string);
|
||||||
|
|
||||||
friend class CCompositor;
|
friend class CCompositor;
|
||||||
friend class CInputManager;
|
friend class CInputManager;
|
||||||
|
|
Loading…
Reference in a new issue