Don't put new floating windows on top unless they're focused

This commit is contained in:
Martin T. H. Sandsmark 2016-12-27 19:00:09 +01:00 committed by Orestis Floros
parent dd13cae5c0
commit bf7aeced30
1 changed files with 5 additions and 1 deletions

View File

@ -196,7 +196,11 @@ void floating_enable(Con *con, bool automatic) {
/* We insert nc already, even though its rect is not yet calculated. This /* We insert nc already, even though its rect is not yet calculated. This
* is necessary because otherwise the workspace might be empty (and get * is necessary because otherwise the workspace might be empty (and get
* closed in tree_close_internal()) even though its not. */ * closed in tree_close_internal()) even though its not. */
if (set_focus) {
TAILQ_INSERT_TAIL(&(ws->floating_head), nc, floating_windows); 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); TAILQ_INSERT_TAIL(&(ws->focus_head), nc, focused);
/* check if the parent container is empty and close it if so */ /* check if the parent container is empty and close it if so */