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:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user