bindings: defer while initiailizing

This adds the logic to defer binding execution while sway is still
initializing. Without this, the binding command would be executed, but
the command handler would return CMD_DEFER, which was being treated as
a failure to run. To avoid partial executions, this will defer all
bindings while config->active is false.
This commit is contained in:
Brian Ashworth 2019-06-11 21:41:02 -04:00 committed by Simon Ser
parent 2b5bf78faf
commit 9670ccee68
6 changed files with 47 additions and 2 deletions

View file

@ -558,6 +558,11 @@ bool read_config(FILE *file, struct sway_config *config,
*/
void run_deferred_commands(void);
/**
* Run the binding commands that were deferred when initializing the inputs
*/
void run_deferred_bindings(void);
/**
* Adds a warning entry to the swaynag instance used for errors.
*/