summaryrefslogtreecommitdiff
path: root/hyprtester/plugin/src/main.cpp
diff options
context:
space:
mode:
authorItsOhen <TNordfeldt@gmail.com>2025-10-11 02:40:18 +0200
committerGitHub <noreply@github.com>2025-10-11 02:40:18 +0200
commitd599513d4a72d66ac62ffdedc41d6653fa81b39e (patch)
tree9ce093a84421330da38f015d40c94941b43e6a04 /hyprtester/plugin/src/main.cpp
parent6a01c399a971a57854fb4a99ce246534139beda4 (diff)
config: add automatic closing to submaps (#11760)
* Allow submaps to auto reset to parent. * Really should be a stack instead. If hyprlang would allow for { } i would be so happy. * Fixed: Somewhat better way to do it.. Lets you define what submap you want to go to instead. * squash! Fixed: Somewhat better way to do it.. * God i hate cf.. * Force clang-format on the whole thing.. * Removed {}. * Added tests Tests and reset fix.
Diffstat (limited to 'hyprtester/plugin/src/main.cpp')
-rw-r--r--hyprtester/plugin/src/main.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/hyprtester/plugin/src/main.cpp b/hyprtester/plugin/src/main.cpp
index 07f90e9f..1d0b68dc 100644
--- a/hyprtester/plugin/src/main.cpp
+++ b/hyprtester/plugin/src/main.cpp
@@ -205,9 +205,9 @@ static SDispatchResult vkb(std::string in) {
}
static SDispatchResult scroll(std::string in) {
- int by;
+ double by;
try {
- by = std::stoi(in);
+ by = std::stod(in);
} catch (...) { return SDispatchResult{.success = false, .error = "invalid input"}; }
Debug::log(LOG, "tester: scrolling by {}", by);
@@ -272,4 +272,4 @@ APICALL EXPORT void PLUGIN_EXIT() {
g_mouse.reset();
g_keyboard->destroy();
g_keyboard.reset();
-} \ No newline at end of file
+}