From: Tony Crisci Date: Fri, 22 Nov 2013 15:00:49 +0000 (-0500) Subject: Remove-child callback skips output content cons X-Git-Tag: 4.7~17^2^2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=57822e3ed43c011ad8d28c09b31c014cd930fe9b;p=i3%2Fi3 Remove-child callback skips output content cons Every container 'above' (in the hierarchy) the workspace content should not be closed when the last child was removed. Add a check for output content containers and do not handle them. These cons are at the root of the output container with dockarea siblings. They may be run through this callback when an output is killed with RandR. Fixes an issue that caused content cons to become urgent when the output is killed with RandR. fixes: #1121 --- diff --git a/src/con.c b/src/con.c index 5b68481a..d5b8c140 100644 --- a/src/con.c +++ b/src/con.c @@ -1354,8 +1354,9 @@ static void con_on_remove_child(Con *con) { * not be closed when the last child was removed */ if (con->type == CT_OUTPUT || con->type == CT_ROOT || - con->type == CT_DOCKAREA) { - DLOG("not handling, type = %d\n", con->type); + con->type == CT_DOCKAREA || + (con->parent != NULL && con->parent->type == CT_OUTPUT)) { + DLOG("not handling, type = %d, name = %s\n", con->type, con->name); return; }