From: Martin T. H. Sandsmark Date: Tue, 27 Dec 2016 18:00:09 +0000 (+0100) Subject: Don't put new floating windows on top unless they're focused X-Git-Tag: 4.14.1~7 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=683e33199d7905786ddc83a9fcf33d0b722c2e50;p=i3%2Fi3 Don't put new floating windows on top unless they're focused --- diff --git a/src/floating.c b/src/floating.c index f2994339..f0499e60 100644 --- a/src/floating.c +++ b/src/floating.c @@ -196,7 +196,11 @@ void floating_enable(Con *con, bool automatic) { /* We insert nc already, even though its rect is not yet calculated. This * is necessary because otherwise the workspace might be empty (and get * closed in tree_close_internal()) even though it’s not. */ - TAILQ_INSERT_TAIL(&(ws->floating_head), nc, floating_windows); + if (set_focus) { + TAILQ_INSERT_TAIL(&(ws->floating_head), nc, floating_windows); + } else { + TAILQ_INSERT_HEAD(&(ws->floating_head), nc, floating_windows); + } TAILQ_INSERT_TAIL(&(ws->focus_head), nc, focused); /* check if the parent container is empty and close it if so */