From dfa8e50a2c6a9dfe84027d57ddce78e193da1bd0 Mon Sep 17 00:00:00 2001 From: Moritz Gleissner Date: Tue, 11 Jun 2024 21:45:37 +0200 Subject: [PATCH 1/3] fixed mouse dispatcher --- src/config/ConfigManager.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index 80af063bf6a..25238f1c58b 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -2028,6 +2028,10 @@ std::optional CConfigManager::handleBind(const std::string& command auto HANDLER = ARGS[2 + DESCR_OFFSET]; + if (mouse) { + HANDLER = "mouse"; + } + const auto COMMAND = mouse ? HANDLER : ARGS[3 + DESCR_OFFSET]; // to lower From 6e3863c60d306f701712aa864006ce7686f6ea24 Mon Sep 17 00:00:00 2001 From: Moritz Gleissner Date: Tue, 11 Jun 2024 22:24:44 +0200 Subject: [PATCH 2/3] no brakets --- src/config/ConfigManager.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index 25238f1c58b..24574bb1d23 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -2028,9 +2028,8 @@ std::optional CConfigManager::handleBind(const std::string& command auto HANDLER = ARGS[2 + DESCR_OFFSET]; - if (mouse) { + if (mouse) HANDLER = "mouse"; - } const auto COMMAND = mouse ? HANDLER : ARGS[3 + DESCR_OFFSET]; From 7c2bb933f1d868bf50894919e31479301a4e9e80 Mon Sep 17 00:00:00 2001 From: Moritz Gleissner Date: Tue, 11 Jun 2024 22:27:19 +0200 Subject: [PATCH 3/3] move command up --- src/config/ConfigManager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index 24574bb1d23..e0de33cf6e1 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -2028,11 +2028,11 @@ std::optional CConfigManager::handleBind(const std::string& command auto HANDLER = ARGS[2 + DESCR_OFFSET]; + const auto COMMAND = mouse ? HANDLER : ARGS[3 + DESCR_OFFSET]; + if (mouse) HANDLER = "mouse"; - const auto COMMAND = mouse ? HANDLER : ARGS[3 + DESCR_OFFSET]; - // to lower std::transform(HANDLER.begin(), HANDLER.end(), HANDLER.begin(), ::tolower);