From 26237508eadb5f71befe4c64ab65430757d4b213 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Wed, 25 Mar 2015 20:49:19 +0100 Subject: [PATCH] Bugfix: skip restart_mode swallow specifications MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Otherwise, placeholder windows would accumulate these over restarts. The worst part is that they don’t get dumped properly, meaning an empty swallows specification ends up in the state, which matches any window, so other random windows would be matched into the placeholder (e.g. i3bar). fixes #1502 --- src/ipc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ipc.c b/src/ipc.c index acd2267b..ff2cd820 100644 --- a/src/ipc.c +++ b/src/ipc.c @@ -450,6 +450,10 @@ void dump_node(yajl_gen gen, struct Con *con, bool inplace_restart) { y(array_open); Match *match; TAILQ_FOREACH(match, &(con->swallow_head), matches) { + /* We will generate a new restart_mode match specification after this + * loop, so skip this one. */ + if (match->restart_mode) + continue; y(map_open); if (match->dock != -1) { ystr("dock"); -- 2.39.5