aboutsummaryrefslogtreecommitdiff
path: root/include/sway/config.h
diff options
context:
space:
mode:
authorBrian Ashworth <bosrsf04@gmail.com>2019-02-16 16:14:27 -0500
committeremersion <contact@emersion.fr>2019-02-16 23:37:36 +0100
commit272ca061714a77597feae1075cdd2d44ebdf5ce3 (patch)
tree27ea1aefcf2b88364831bf2793288c47c3a033c6 /include/sway/config.h
parent0bafc55176f97d2c5d991e8e5fb0e11a989b88d2 (diff)
Fix reload freeze when not modsetting current mode
This fixes the issue of the display freezing on reload with wlroots#1545. On master, all output configs are applied on reload. This may cause an output to have its config applied up to three times, instead of just once. The three cases are: output name, output identifier, and wildcard. Not only is this inefficient, but it can cause swaybg to be spawned and immediately killed. However, swaybg requires two roundtrips of wl_display (to obtain needed globals) before it enters its normal event loop. Modesetting will roundtrip the wl_display. Without modesetting, waitpid for killing swaybg could block infinitely due to swaybg being blocked by wl_display_roundtrip. This only configured an output once. It either uses the wildcard config or creates an empty wildcard config and applies that. This also fixes a bug where an output would not be reset when there is no output config to apply to it.
Diffstat (limited to 'include/sway/config.h')
-rw-r--r--include/sway/config.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/sway/config.h b/include/sway/config.h
index 43ea7778..54cdcc90 100644
--- a/include/sway/config.h
+++ b/include/sway/config.h
@@ -586,6 +586,8 @@ struct output_config *store_output_config(struct output_config *oc);
void apply_output_config_to_outputs(struct output_config *oc);
+void reset_outputs(void);
+
void free_output_config(struct output_config *oc);
int workspace_output_cmp_workspace(const void *a, const void *b);