aboutsummaryrefslogtreecommitdiffstats
path: root/include/sway/config.h
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-10-08 19:28:53 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-10-08 19:28:53 +1000
commit82423991a8512ab97fbc41d1e190e709c58bc346 (patch)
tree837e45f94240e02e2ab0f8f931227943e00819b3 /include/sway/config.h
parentMerge pull request #2786 from swaywm/no-op-client-commands (diff)
downloadsway-82423991a8512ab97fbc41d1e190e709c58bc346.tar.gz
sway-82423991a8512ab97fbc41d1e190e709c58bc346.tar.zst
sway-82423991a8512ab97fbc41d1e190e709c58bc346.zip
Reload config using idle event
This patch makes it so when you run reload, the actual reloading is deferred to the next time the event loop becomes idle. This avoids several use-after-frees and removes the workarounds we have to avoid them. When you run reload, we validate the config before creating the idle event. This is so the reload command will still return an error if there are validation errors. To allow this, load_main_config has been adjusted so it doesn't apply the config if validating is true rather than applying it unconditionally. This also fixes a memory leak in the reload command where if the config failed to load, the bar_ids list would not be freed.
Diffstat (limited to 'include/sway/config.h')
-rw-r--r--include/sway/config.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/include/sway/config.h b/include/sway/config.h
index 02ace979..0e51fbfb 100644
--- a/include/sway/config.h
+++ b/include/sway/config.h
@@ -35,7 +35,6 @@ enum binding_flags {
35 BINDING_BORDER=4, // mouse only; trigger on container border 35 BINDING_BORDER=4, // mouse only; trigger on container border
36 BINDING_CONTENTS=8, // mouse only; trigger on container contents 36 BINDING_CONTENTS=8, // mouse only; trigger on container contents
37 BINDING_TITLEBAR=16, // mouse only; trigger on container titlebar 37 BINDING_TITLEBAR=16, // mouse only; trigger on container titlebar
38 BINDING_RELOAD=32, // the binding runs the reload command
39}; 38};
40 39
41/** 40/**