aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormemchr <[email protected]>2023-07-24 16:25:10 +0000
committerGitHub <[email protected]>2023-07-24 18:25:10 +0200
commit76c6e09e3945ccf1d89ec4262a4ac3f7c3d3cca4 (patch)
treefc075b89966365d2b1996f5d333b560060fda26c
parent9bad2a81809bdaa2020006427af2110b6a912c3b (diff)
downloadHyprland-76c6e09e3945ccf1d89ec4262a4ac3f7c3d3cca4.tar.gz
Hyprland-76c6e09e3945ccf1d89ec4262a4ac3f7c3d3cca4.zip
keybinds: Make moveintogroup locking check configurable (#2796)
* groups: revert to the old moveintogroup behaviour, ignore m_sGroupData.locked * groups: Make moveintogroup locking check configurable
-rw-r--r--src/config/ConfigManager.cpp1
-rw-r--r--src/managers/KeybindManager.cpp6
2 files changed, 5 insertions, 2 deletions
diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp
index 0fd165cd..18f1881c 100644
--- a/src/config/ConfigManager.cpp
+++ b/src/config/ConfigManager.cpp
@@ -100,6 +100,7 @@ void CConfigManager::setDefaultVars() {
configValues["misc:swallow_exception_regex"].strValue = STRVAL_EMPTY;
configValues["misc:focus_on_activate"].intValue = 0;
configValues["misc:no_direct_scanout"].intValue = 1;
+ configValues["misc:moveintogroup_lock_check"].intValue = 0;
configValues["misc:hide_cursor_on_touch"].intValue = 1;
configValues["misc:mouse_move_focuses_monitor"].intValue = 1;
configValues["misc:suppress_portal_warnings"].intValue = 0;
diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp
index 13837e97..3b87f3b3 100644
--- a/src/managers/KeybindManager.cpp
+++ b/src/managers/KeybindManager.cpp
@@ -2018,7 +2018,9 @@ void CKeybindManager::lockActiveGroup(std::string args) {
}
void CKeybindManager::moveIntoGroup(std::string args) {
- char arg = args[0];
+ char arg = args[0];
+
+ static auto* const GROUPLOCKCHECK = &g_pConfigManager->getConfigValuePtr("misc:moveintogroup_lock_check")->intValue;
if (!isDirection(args)) {
Debug::log(ERR, "Cannot move into group in direction %c, unsupported direction. Supported: l,r,u/t,d/b", arg);
@@ -2035,7 +2037,7 @@ void CKeybindManager::moveIntoGroup(std::string args) {
if (!PWINDOWINDIR || !PWINDOWINDIR->m_sGroupData.pNextWindow)
return;
- if (PWINDOW->m_sGroupData.locked || PWINDOWINDIR->m_sGroupData.locked)
+ if (*GROUPLOCKCHECK && (PWINDOWINDIR->getGroupHead()->m_sGroupData.locked || (PWINDOW->m_sGroupData.pNextWindow && PWINDOW->m_sGroupData.locked)))
return;
if (!PWINDOW->m_sGroupData.pNextWindow)