From: Michael Stapelberg Date: Sat, 7 Mar 2015 14:38:10 +0000 (+0100) Subject: Bugfix: insert id-based match at HEAD, not TAIL. X-Git-Tag: 4.9.1~4^2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=df1fcdafe82e5d8e6a8a76967c679cd64e1b2ab3;p=i3%2Fi3 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 --- 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;