forked from enlightenment/enlightenment
Tiling2: Changed add to return new root and fixed top-level vertical.
This commit is contained in:
parent
1114b54c71
commit
1a2ffcd06e
|
@ -482,7 +482,6 @@ _add_client(E_Client *ec)
|
|||
/* If focused is NULL, it should return the root. */
|
||||
Window_Tree *parent = tiling_window_tree_client_find(_G.tinfo->tree,
|
||||
ec_focused);
|
||||
Window_Tree *new_node;
|
||||
if (!parent)
|
||||
{
|
||||
if (_G.tinfo->tree && ec_focused)
|
||||
|
@ -493,9 +492,7 @@ _add_client(E_Client *ec)
|
|||
parent = _G.tinfo->tree;
|
||||
}
|
||||
|
||||
new_node = tiling_window_tree_add(_G.tinfo->tree, parent, ec, _G.split_type);
|
||||
if (!_G.tinfo->tree)
|
||||
_G.tinfo->tree = new_node;
|
||||
_G.tinfo->tree = tiling_window_tree_add(_G.tinfo->tree, parent, ec, _G.split_type);
|
||||
}
|
||||
|
||||
_reapply_tree();
|
||||
|
|
|
@ -114,12 +114,16 @@ tiling_window_tree_add(Window_Tree *root, Window_Tree *parent, E_Client *client,
|
|||
}
|
||||
else
|
||||
{
|
||||
/* FIXME: This is wrong. */
|
||||
root = calloc(1, sizeof(*root));
|
||||
_tiling_window_tree_split_add(parent, new_node);
|
||||
root->weight = 1.0;
|
||||
root->children = eina_inlist_append(root->children,
|
||||
EINA_INLIST_GET(parent));
|
||||
parent->parent = root;
|
||||
}
|
||||
}
|
||||
|
||||
return new_node;
|
||||
return root;
|
||||
}
|
||||
|
||||
Window_Tree *
|
||||
|
|
Loading…
Reference in New Issue