Skip to content

Commit

Permalink
set bindm argument as upstream does
Browse files Browse the repository at this point in the history
  • Loading branch information
horriblename committed Jun 2, 2024
1 parent 53c3f67 commit c02a7fb
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
});
Expand Down

0 comments on commit c02a7fb

Please sign in to comment.