Remove-child callback skips output content cons
Patch status: merged
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. 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.
To apply this patch, use:
curl http://cr.i3wm.org/patch/327/raw.patch | git am
b/src/con.c
23 |
@@ -1355,8 +1355,9 @@ static void con_on_remove_child(Con *con) { |
24 |
* not be closed when the last child was removed */ |
25 |
if (con->type == CT_OUTPUT || |
26 |
con->type == CT_ROOT || |
27 |
- con->type == CT_DOCKAREA) { |
28 |
- DLOG("not handling, type = %d\n", con->type); |
29 |
+ con->type == CT_DOCKAREA || |
30 |
+ (con->parent != NULL && con->parent->type == CT_OUTPUT)) { |
31 |
+ DLOG("not handling, type = %d, name = %s\n", con->type, con->name); |
32 |
return; |
33 |
} |
34 |
|