From c02a7fb70eb262098f439fd8be789409f18debb7 Mon Sep 17 00:00:00 2001 From: Ching Pei Yang Date: Sun, 2 Jun 2024 13:18:34 +0200 Subject: [PATCH] set bindm argument as upstream does --- src/main.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index bfb0b3d..b32dbe4 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -50,15 +50,14 @@ Hyprlang::CParseResult onNewBind(const char* K, const char* V) { return result; } + const auto mouse = std::string("bindm") == K; const auto key = vars[1]; - const auto dispatcher = vars[2]; - const auto dispatcherArgs = vars[3]; - - const auto mouse = std::string("bindm") == K; + const auto dispatcher = mouse ? "mouse" : vars[2]; + const auto dispatcherArgs = mouse ? vars[2] : vars[3]; g_pGestureManager->internalBinds.emplace_back(SKeybind{ .key = key, - .handler = mouse ? "mouse" : dispatcher, + .handler = dispatcher, .arg = dispatcherArgs, .mouse = mouse, });