summaryrefslogtreecommitdiff
path: root/hyprtester/plugin/src/main.cpp
diff options
context:
space:
mode:
authorVaxry <43317083+vaxerski@users.noreply.github.com>2025-12-05 14:16:22 +0000
committerGitHub <noreply@github.com>2025-12-05 14:16:22 +0000
commit9264436f35e2c4e94adfdf2a8ea23a346ace3a65 (patch)
tree9fe48ff4728060445e655d8a3b528999fd124ff8 /hyprtester/plugin/src/main.cpp
parentd5c52ef58e57b371a9df8fd4404c5d55a1b26f34 (diff)
desktop: rewrite reserved area handling + improve tests (#12383)
Diffstat (limited to 'hyprtester/plugin/src/main.cpp')
-rw-r--r--hyprtester/plugin/src/main.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/hyprtester/plugin/src/main.cpp b/hyprtester/plugin/src/main.cpp
index cbc06723..b8706f52 100644
--- a/hyprtester/plugin/src/main.cpp
+++ b/hyprtester/plugin/src/main.cpp
@@ -225,7 +225,7 @@ static SDispatchResult scroll(std::string in) {
}
static SDispatchResult keybind(std::string in) {
- CVarList data(in);
+ CVarList2 data(std::move(in));
// 0 = release, 1 = press
bool press;
// See src/devices/IKeyboard.hpp : eKeyboardModifiers for modifier bitmasks
@@ -234,9 +234,9 @@ static SDispatchResult keybind(std::string in) {
// keycode
uint32_t key;
try {
- press = std::stoul(data[0]) == 1;
- modifier = std::stoul(data[1]);
- key = std::stoul(data[2]) - 8; // xkb offset
+ press = std::stoul(std::string{data[0]}) == 1;
+ modifier = std::stoul(std::string{data[1]});
+ key = std::stoul(std::string{data[2]}) - 8; // xkb offset
} catch (...) { return {.success = false, .error = "invalid input"}; }
uint32_t modifierMask = 0;