mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-26 06:05:59 +01:00
keybinds: Add an option to pass a window argument to moveoutofgroup (#4724)
* keybinds: allow passing window to moveoutofgroup * keybinds: cleaner handling of certain args
This commit is contained in:
parent
289d952a6e
commit
5261a8df81
1 changed files with 8 additions and 3 deletions
|
@ -797,7 +797,7 @@ void CKeybindManager::clearKeybinds() {
|
||||||
void CKeybindManager::toggleActiveFloating(std::string args) {
|
void CKeybindManager::toggleActiveFloating(std::string args) {
|
||||||
CWindow* PWINDOW = nullptr;
|
CWindow* PWINDOW = nullptr;
|
||||||
|
|
||||||
if (args != "" && args != "active" && args.length() > 1)
|
if (args != "active" && args.length() > 1)
|
||||||
PWINDOW = g_pCompositor->getWindowByRegex(args);
|
PWINDOW = g_pCompositor->getWindowByRegex(args);
|
||||||
else
|
else
|
||||||
PWINDOW = g_pCompositor->m_pLastWindow;
|
PWINDOW = g_pCompositor->m_pLastWindow;
|
||||||
|
@ -1941,7 +1941,7 @@ void CKeybindManager::pinActive(std::string args) {
|
||||||
|
|
||||||
CWindow* PWINDOW = nullptr;
|
CWindow* PWINDOW = nullptr;
|
||||||
|
|
||||||
if (args != "" && args != "active" && args.length() > 1)
|
if (args != "active" && args.length() > 1)
|
||||||
PWINDOW = g_pCompositor->getWindowByRegex(args);
|
PWINDOW = g_pCompositor->getWindowByRegex(args);
|
||||||
else
|
else
|
||||||
PWINDOW = g_pCompositor->m_pLastWindow;
|
PWINDOW = g_pCompositor->m_pLastWindow;
|
||||||
|
@ -2180,7 +2180,12 @@ void CKeybindManager::moveOutOfGroup(std::string args) {
|
||||||
if (!*PIGNOREGROUPLOCK && g_pKeybindManager->m_bGroupsLocked)
|
if (!*PIGNOREGROUPLOCK && g_pKeybindManager->m_bGroupsLocked)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const auto PWINDOW = g_pCompositor->m_pLastWindow;
|
CWindow* PWINDOW = nullptr;
|
||||||
|
|
||||||
|
if (args != "active" && args.length() > 1)
|
||||||
|
PWINDOW = g_pCompositor->getWindowByRegex(args);
|
||||||
|
else
|
||||||
|
PWINDOW = g_pCompositor->m_pLastWindow;
|
||||||
|
|
||||||
if (!PWINDOW || !PWINDOW->m_sGroupData.pNextWindow)
|
if (!PWINDOW || !PWINDOW->m_sGroupData.pNextWindow)
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue