From 77640da9e7741a90caf2852fb7d8ac426ef91796 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Thu, 3 Mar 2011 14:03:06 +0100 Subject: [PATCH] =?utf8?q?Bugfix:=20don=E2=80=99t=20focus=20the=20dockarea?= =?utf8?q?=20when=20closing=20a=20dock=20client?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/tree.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/tree.c b/src/tree.c index 3900b862..31177109 100644 --- a/src/tree.c +++ b/src/tree.c @@ -184,7 +184,12 @@ void tree_close(Con *con, bool kill_window, bool dont_kill_parent) { if (kill_window || !dont_kill_parent || con == focused) { DLOG("focusing %p / %s\n", next, next->name); /* TODO: check if the container (or one of its children) was focused */ - con_focus(next); + if (next->type == CT_DOCKAREA) { + /* Instead of focusing the dockarea, we need to restore focus to the workspace */ + con_focus(con_descend_focused(output_get_content(next->parent))); + } else { + con_focus(next); + } } else { DLOG("not focusing because we're not killing anybody"); -- 2.39.5