From 82423991a8512ab97fbc41d1e190e709c58bc346 Mon Sep 17 00:00:00 2001
From: Ryan Dwyer <ryandwyer1@gmail.com>
Date: Mon, 8 Oct 2018 19:28:53 +1000
Subject: 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.
---
 include/sway/config.h | 1 -
 1 file changed, 1 deletion(-)

(limited to 'include')

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 {
 	BINDING_BORDER=4,    // mouse only; trigger on container border
 	BINDING_CONTENTS=8,  // mouse only; trigger on container contents
 	BINDING_TITLEBAR=16, // mouse only; trigger on container titlebar
-	BINDING_RELOAD=32,   // the binding runs the reload command
 };
 
 /**
-- 
cgit v1.2.3