summaryrefslogtreecommitdiff
path: root/sway/config.c
diff options
context:
space:
mode:
authorBrian Ashworth <[email protected]>2019-06-18 22:27:57 -0400
committerSimon Ser <[email protected]>2019-06-19 07:40:52 +0300
commit5069b53d6c561d0f949cb0aec1d70397a2fb8a90 (patch)
tree9738ba995d5a520560fc4262ff7b025d6bfaf71e /sway/config.c
parentddad41f423db14f89f765fc134d45d1ea8a60caf (diff)
config/xwayland: retain xwayland status on reload
Since xwayland can only be enabled/disabled at launch, the xwayland status should be retained on reload. Having `xwayland enabled|disabled` in the config, should not cause `config->xwayland` to be invalid on reload. This also returns `CMD_FAILURE` with a message that xwayland can only be enabled/disabled on launch when trying to set the invalid status on reload. This allows swaynag to notify the user that the change will not take effect until sway is restarted.
Diffstat (limited to 'sway/config.c')
-rw-r--r--sway/config.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sway/config.c b/sway/config.c
index 4e64bd3a..70f2d706 100644
--- a/sway/config.c
+++ b/sway/config.c
@@ -441,6 +441,11 @@ bool load_main_config(const char *file, bool is_active, bool validating) {
config->reloading = true;
config->active = true;
+ // xwayland can only be enabled/disabled at launch
+ sway_log(SWAY_DEBUG, "xwayland will remain %s",
+ old_config->xwayland ? "enabled" : "disabled");
+ config->xwayland = old_config->xwayland;
+
if (old_config->swaybg_client != NULL) {
wl_client_destroy(old_config->swaybg_client);
}