From df1fcdafe82e5d8e6a8a76967c679cd64e1b2ab3 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Sat, 7 Mar 2015 15:38:10 +0100 Subject: [PATCH] Bugfix: insert id-based match at HEAD, not TAIL. Before this commit, placeholder windows had any matches that were defined in the JSON file, _followed_ by an i3-internal match that ensures the placeholder X11 window gets swallowed into the placeholder i3 container. The problem was that the first successful match was deleted, and if users specified a criterion (title=IPython) that matched the placeholder window itself (name=IPython), then that match is deleted and the i3-internal match is kept. This results in the actual window the user wants to match not being swallowed, and the placeholder window not displaying any criteria. fixes #1526 --- src/restore_layout.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/restore_layout.c b/src/restore_layout.c index 3a657c90..f4ef5475 100644 --- a/src/restore_layout.c +++ b/src/restore_layout.c @@ -219,7 +219,7 @@ static void open_placeholder_window(Con *con) { Match *temp_id = smalloc(sizeof(Match)); match_init(temp_id); temp_id->id = placeholder; - TAILQ_INSERT_TAIL(&(con->swallow_head), temp_id, matches); + TAILQ_INSERT_HEAD(&(con->swallow_head), temp_id, matches); } Con *child; -- 2.39.5