diff --git a/docs/labwc-actions.5.scd b/docs/labwc-actions.5.scd index 6d74700d..84dcb947 100644 --- a/docs/labwc-actions.5.scd +++ b/docs/labwc-actions.5.scd @@ -75,6 +75,9 @@ Actions are used in menus and keyboard/mouse bindings. Send active window to workspace. Supported values are the same as for GoToDesktop. +** + If used as the only action for a binding: clear an earlier defined binding. + # SEE ALSO labwc(1), labwc-config(5), labwc-theme(5) diff --git a/src/action.c b/src/action.c index 44564447..95871e43 100644 --- a/src/action.c +++ b/src/action.c @@ -16,7 +16,8 @@ #include "workspaces.h" enum action_type { - ACTION_TYPE_NONE = 0, + ACTION_TYPE_INVALID = 0, + ACTION_TYPE_NONE, ACTION_TYPE_CLOSE, ACTION_TYPE_DEBUG, ACTION_TYPE_EXECUTE, @@ -41,7 +42,8 @@ enum action_type { }; const char *action_names[] = { - "NoOp", + "INVALID", + "None", "Close", "Debug", "Execute", @@ -93,7 +95,7 @@ action_type_from_str(const char *action_name) } } wlr_log(WLR_ERROR, "Invalid action: %s", action_name); - return ACTION_TYPE_NONE; + return ACTION_TYPE_INVALID; } struct action * @@ -349,6 +351,8 @@ actions_run(struct view *activator, struct server *server, } break; case ACTION_TYPE_NONE: + break; + case ACTION_TYPE_INVALID: wlr_log(WLR_ERROR, "Not executing unknown action"); break; default: