Remove-child callback will not handle output cons
Patch status: needinfo
Patch by Tony Crisci
Long description:
Every container 'above' (in the hierarchy) the workspace content should not be closed when the last child was removed. Test whether the container is 'above' workspace content by calling `con_get_workspace` and seeing if it is null. This test is more robust than checking if the container is an output, the root, or a dockarea because it includes output "container cons" which should not be handled. Fixes an issue that caused output "container cons" to become urgent when the output is killed with RandR.
To apply this patch, use:
curl http://cr.i3wm.org/patch/320/raw.patch | git am
b/src/con.c
23 |
@@ -1353,9 +1353,7 @@ static void con_on_remove_child(Con *con) { |
24 |
|
25 |
/* Every container 'above' (in the hierarchy) the workspace content should |
26 |
* not be closed when the last child was removed */ |
27 |
- if (con->type == CT_OUTPUT || |
28 |
- con->type == CT_ROOT || |
29 |
- con->type == CT_DOCKAREA) { |
30 |
+ if (con_get_workspace(con) == NULL) { |
31 |
DLOG("not handling, type = %d\n", con->type); |
32 |
return; |
33 |
} |