X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=src%2Fcon.c;h=45021f5f71320cf56cbde11e2a4a392fe653e593;hb=08f64f011d00da966b474d4f93f7f55b78387fb7;hp=1adfcf358397a0e7ca0a6379179636a1890841be;hpb=36583ec6ee7ada36764a492fdaae158a5cdd04c3;p=i3%2Fi3 diff --git a/src/con.c b/src/con.c index 1adfcf35..45021f5f 100644 --- a/src/con.c +++ b/src/con.c @@ -642,6 +642,10 @@ Con *con_next_focused(Con *con) { DLOG("Focus list empty, returning ws\n"); next = ws; } + } else { + /* Instead of returning the next CT_FLOATING_CON, we descend it to + * get an actual window to focus. */ + next = con_descend_focused(next); } return next; } @@ -881,7 +885,7 @@ static void con_on_remove_child(Con *con) { int children = con_num_children(con); if (children == 0) { DLOG("Container empty, closing\n"); - tree_close(con, false, false); + tree_close(con, DONT_KILL_WINDOW, false); return; } }