]> git.mdlowis.com Git - proto/labwc.git/commit
src/action.c: validate action type when assigning arguments
authorConsolatis <35009135+Consolatis@users.noreply.github.com>
Thu, 11 May 2023 21:36:51 +0000 (23:36 +0200)
committerConsolatis <35009135+Consolatis@users.noreply.github.com>
Mon, 15 May 2023 20:32:33 +0000 (22:32 +0200)
commitab8ab3dd869853e5b39c2b8ea4cc38530f9b3d45
treeae5422526610eeabb17c231780b87aa0669de495
parent7ad5200f2ec6843916b82a6efefac0685aeff5ce
src/action.c: validate action type when assigning arguments

Before this patch it was possible to assign an argument with an
existing name to an action that didn't support the given argument.
An example of this is using `direction` for `GoToDesktop`.

This patch now only creates action arguments that are actually
defined for the given action type and logs an error for
unsupported arguments.

The commit also makes sure to always supply the argument name.
This will reduce required checks in other parts of the codebase
in future commits.

Partly fixes: #894
src/action.c