aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLibravatar Brian Ashworth <bosrsf04@gmail.com>2019-01-29 13:18:53 -0500
committerLibravatar Brian Ashworth <bosrsf04@gmail.com>2019-01-29 13:18:53 -0500
commitf0fd6119cffd22c1bdf5553cc2a729839840d63e (patch)
tree9c30e11d281adaa634231f91eed98a84860ded1b /include
parentDocument cursor moving between adjacent outputs (diff)
downloadsway-f0fd6119cffd22c1bdf5553cc2a729839840d63e.tar.gz
sway-f0fd6119cffd22c1bdf5553cc2a729839840d63e.tar.zst
sway-f0fd6119cffd22c1bdf5553cc2a729839840d63e.zip
Cleanup config reading failure error logs
This cleans up the log when sway fails to read a config file. The following changes have been made: - A missing error message has been added to the log when the config file is a directory instead of a regular file - In main, `goto` statements have been added after the `sway_terminate` calls instead of wrapping every block in `if (!terminate_request)` - Unnecessary NULL-checks around calls to free in `main` have been removed - Deferred command execution has been extracted to a separate function and the `Running deferred commands` log message will not be shown when there are no deferred commands.
Diffstat (limited to 'include')
-rw-r--r--include/sway/config.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/sway/config.h b/include/sway/config.h
index 8215ff59..d5467a56 100644
--- a/include/sway/config.h
+++ b/include/sway/config.h
@@ -516,6 +516,11 @@ bool read_config(FILE *file, struct sway_config *config,
516 struct swaynag_instance *swaynag); 516 struct swaynag_instance *swaynag);
517 517
518/** 518/**
519 * Run the commands that were deferred when reading the config file.
520 */
521void run_deferred_commands(void);
522
523/**
519 * Adds a warning entry to the swaynag instance used for errors. 524 * Adds a warning entry to the swaynag instance used for errors.
520 */ 525 */
521void config_add_swaynag_warning(char *fmt, ...); 526void config_add_swaynag_warning(char *fmt, ...);