Fix crash when trying to split and float a dock container.

Since splitting a docking container was allowed and successful, the check
to prevent floating it fails to work. This causes a crash because the
workspace of the container cannot be determined as the dockarea is higher
up in the tree than the workspace it belongs to.

This patch extends to sanity check to nested dock containers when trying to
float a container and also disallows manually splitting a docked container
or changing its layout.

fixes #2034
This commit is contained in:
Ingo Bürk
2015-10-26 18:16:21 +01:00
parent d187214562
commit 3d6c76eb93
4 changed files with 40 additions and 16 deletions

View File

@ -108,7 +108,7 @@ void floating_check_size(Con *floating_con) {
void floating_enable(Con *con, bool automatic) {
bool set_focus = (con == focused);
if (con->parent && con->parent->type == CT_DOCKAREA) {
if (con_is_docked(con)) {
LOG("Container is a dock window, not enabling floating mode.\n");
return;
}