From e48441ecbdee4dae030c2e89a1c8836dd5a31c8a Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Mon, 18 Sep 2017 16:37:34 +0200 Subject: [PATCH] Bugfix: avert crash by fixing focus when creating output containers (#2966) fixes #2854 --- src/randr.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/randr.c b/src/randr.c index 88cad7c5..19c40577 100644 --- a/src/randr.c +++ b/src/randr.c @@ -380,6 +380,10 @@ void output_init_con(Output *output) { FREE(name); DLOG("attaching\n"); con_attach(bottomdock, con, false); + + /* Change focus to the content container */ + TAILQ_REMOVE(&(con->focus_head), content, focused); + TAILQ_INSERT_HEAD(&(con->focus_head), content, focused); } /* -- 2.39.5