keybinds: Make moveintogroup locking check configurable (#2796)

* groups: revert to the old moveintogroup behaviour, ignore m_sGroupData.locked

* groups: Make moveintogroup locking check configurable
This commit is contained in:
memchr 2023-07-24 16:25:10 +00:00 committed by GitHub
parent 9bad2a8180
commit 76c6e09e39
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View file

@ -100,6 +100,7 @@ void CConfigManager::setDefaultVars() {
configValues["misc:swallow_exception_regex"].strValue = STRVAL_EMPTY; configValues["misc:swallow_exception_regex"].strValue = STRVAL_EMPTY;
configValues["misc:focus_on_activate"].intValue = 0; configValues["misc:focus_on_activate"].intValue = 0;
configValues["misc:no_direct_scanout"].intValue = 1; configValues["misc:no_direct_scanout"].intValue = 1;
configValues["misc:moveintogroup_lock_check"].intValue = 0;
configValues["misc:hide_cursor_on_touch"].intValue = 1; configValues["misc:hide_cursor_on_touch"].intValue = 1;
configValues["misc:mouse_move_focuses_monitor"].intValue = 1; configValues["misc:mouse_move_focuses_monitor"].intValue = 1;
configValues["misc:suppress_portal_warnings"].intValue = 0; configValues["misc:suppress_portal_warnings"].intValue = 0;

View file

@ -2018,7 +2018,9 @@ void CKeybindManager::lockActiveGroup(std::string args) {
} }
void CKeybindManager::moveIntoGroup(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)) { if (!isDirection(args)) {
Debug::log(ERR, "Cannot move into group in direction %c, unsupported direction. Supported: l,r,u/t,d/b", arg); 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) if (!PWINDOWINDIR || !PWINDOWINDIR->m_sGroupData.pNextWindow)
return; 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; return;
if (!PWINDOW->m_sGroupData.pNextWindow) if (!PWINDOW->m_sGroupData.pNextWindow)