Hyprctl dispatch - resize params negative values crashes command #10670
Unanswered
LuukBlankenstijn
asked this question in
Bugs - IPC / Plugins
Replies: 2 comments 1 reply
-
|
I have a similar issue, works, doesn't work. use -- do solve |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
I created #10671 with a fix. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey, I am using Hyprctl for a project of mine, and I ran into the following bug.
Problem
When i try to use
this does not complete succesfully. However, when using
it does work.
I looked into the source code, and discovered that in hyprctl/main.cpp on line 363,
if (parseArgs && (ARGS[i][0] == '-') && !isNumber(ARGS[i], true) /* For stuff like -2 */), lies the problem. Because of the comma right after the second coordinate,ARGS[i]is-10,. This has as a consequence thatisNumber(ARGS[i], true)returns false and-10,is treated as an option. The option10,does not exist, and the command does not complete successfully.Solution
As a solution I thought of skipping parsing after
ARGS[i]is"dispatch". However, this seems too aggressive, and does not actually solve the bug. I would love to hear opinions on what is the best way to solve it, and I will make a pull-request with the solution.Note
I found out that using
does work. This is to be expected, since with this all arguments after
--are not being parsed and just passed on directly.Beta Was this translation helpful? Give feedback.
All reactions