diff --git a/src/modules/tiling/e_mod_tiling.c b/src/modules/tiling/e_mod_tiling.c index b7ef0e173..775e38a5c 100644 --- a/src/modules/tiling/e_mod_tiling.c +++ b/src/modules/tiling/e_mod_tiling.c @@ -703,7 +703,7 @@ _insert_client_prefered(E_Client *ec) } else { - _G.tinfo->tree = tiling_window_tree_add(_G.tinfo->tree, NULL, ec, _current_tiled_state(EINA_FALSE)); + _G.tinfo->tree = tiling_window_tree_insert(_G.tinfo->tree, _G.tinfo->tree, ec, _current_tiled_state(EINA_FALSE), EINA_FALSE); } } @@ -722,7 +722,7 @@ _insert_client(E_Client *ec, Tiling_Split_Type type) //otherwise place next to the given client place = tiling_window_tree_client_find(_G.tinfo->tree, ec_focused); - _G.tinfo->tree = tiling_window_tree_add(_G.tinfo->tree, place, ec, type); + _G.tinfo->tree = tiling_window_tree_insert(_G.tinfo->tree, place, ec, type, EINA_FALSE); } diff --git a/src/modules/tiling/window_tree.c b/src/modules/tiling/window_tree.c index d8de00267..d0e61d5b6 100644 --- a/src/modules/tiling/window_tree.c +++ b/src/modules/tiling/window_tree.c @@ -142,59 +142,6 @@ tiling_window_tree_insert(Window_Tree *root, Window_Tree *buddy, return root; } -Window_Tree * -tiling_window_tree_add(Window_Tree *root, Window_Tree *parent, - E_Client *client, Tiling_Split_Type split_type) -{ - Window_Tree *orig_parent = parent; - Window_Tree *new_node; - Tiling_Split_Type parent_split_type; - - VERIFY_TYPE(split_type) - - new_node = calloc(1, sizeof(*new_node)); - new_node->client = client; - - ROOT_CHECK() - - if (!parent) - parent = root; - - parent_split_type = _tiling_window_tree_split_type_get(parent); - - if (parent_split_type == split_type) - { - if (parent->children) - { - _tiling_window_tree_parent_add(parent, new_node, NULL, EINA_TRUE); - } - else - { - _tiling_window_tree_split_add(parent, new_node, EINA_TRUE); - } - } - else - { - Window_Tree *grand_parent = parent->parent; - - if (grand_parent && grand_parent->children) - { - _tiling_window_tree_parent_add(grand_parent, new_node, orig_parent, EINA_TRUE); - } - else - { - root = calloc(1, sizeof(*root)); - _tiling_window_tree_split_add(parent, new_node, EINA_TRUE); - root->weight = 1.0; - root->children = - eina_inlist_append(root->children, EINA_INLIST_GET(parent)); - parent->parent = root; - } - } - - return root; -} - static Window_Tree * tiling_window_tree_unref(Window_Tree *root, Window_Tree *item) { diff --git a/src/modules/tiling/window_tree.h b/src/modules/tiling/window_tree.h index 95198db03..93baba858 100644 --- a/src/modules/tiling/window_tree.h +++ b/src/modules/tiling/window_tree.h @@ -34,9 +34,6 @@ int tiling_window_tree_edges_get(Window_Tree *node); void tiling_window_tree_free(Window_Tree *root); void tiling_window_tree_walk(Window_Tree *root, void (*func)(void *)); -Window_Tree *tiling_window_tree_add(Window_Tree *root, Window_Tree *parent, - E_Client *client, Tiling_Split_Type split_type); - Window_Tree *tiling_window_tree_insert(Window_Tree *root, Window_Tree *buddy, E_Client *client, Tiling_Split_Type split_type, Eina_Bool before);