]> git.sur5r.net Git - i3/i3/commitdiff
Bugfix: don’t focus the dockarea when closing a dock client
authorMichael Stapelberg <michael@stapelberg.de>
Thu, 3 Mar 2011 13:03:06 +0000 (14:03 +0100)
committerMichael Stapelberg <michael@stapelberg.de>
Thu, 3 Mar 2011 13:03:06 +0000 (14:03 +0100)
src/tree.c

index 3900b86258948b1cd2ce16b7422dbc26395f377b..31177109302fec70e858d762efc1e8cd11633125 100644 (file)
@@ -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");