Bugfix: skip restart_mode swallow specifications

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
This commit is contained in:
Michael Stapelberg 2015-03-25 20:49:19 +01:00
parent f790fedce3
commit 26237508ea
1 changed files with 4 additions and 0 deletions

View File

@ -450,6 +450,10 @@ void dump_node(yajl_gen gen, struct Con *con, bool inplace_restart) {
y(array_open); y(array_open);
Match *match; Match *match;
TAILQ_FOREACH(match, &(con->swallow_head), matches) { 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); y(map_open);
if (match->dock != -1) { if (match->dock != -1) {
ystr("dock"); ystr("dock");