From da4212680a7182ee43ad38e2918206e66b80516b Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Mon, 13 Jan 2014 17:28:57 +0000 Subject: [PATCH] Tiling2: Completely get rid of the stacks concept. --- src/modules/tiling/e_mod_tiling.c | 28 +++++++++------------------- src/modules/tiling/e_mod_tiling.h | 4 ---- 2 files changed, 9 insertions(+), 23 deletions(-) diff --git a/src/modules/tiling/e_mod_tiling.c b/src/modules/tiling/e_mod_tiling.c index 8f292dcb4..96a354488 100644 --- a/src/modules/tiling/e_mod_tiling.c +++ b/src/modules/tiling/e_mod_tiling.c @@ -272,7 +272,6 @@ _restore_client(E_Client *ec) ERR("No extra for %p", ec); return; } - _e_client_unmaximize(ec, E_MAXIMIZE_BOTH); _e_client_move_resize(ec, extra->orig.geom.x, extra->orig.geom.y, @@ -417,6 +416,13 @@ _reapply_tree(void) } } +void +_restore_free_client(void *client) +{ + _restore_client(client); + free(client); +} + void change_desk_conf(struct _Config_vdesk *newconf) { @@ -426,8 +432,6 @@ change_desk_conf(struct _Config_vdesk *newconf) E_Desk *d; int old_nb_stacks = 0, new_nb_stacks = newconf->nb_stacks; - int i; - Eina_List *l; m = e_manager_current_get(); if (!m) return; @@ -455,15 +459,8 @@ change_desk_conf(struct _Config_vdesk *newconf) return; if (new_nb_stacks == 0) { - for (i = 0; i < TILING_MAX_STACKS; i++) { - for (l = _G.tinfo->stacks[i]; l; l = l->next) { - E_Client *ec = l->data; - - _restore_client(ec); - } - eina_list_free(_G.tinfo->stacks[i]); - _G.tinfo->stacks[i] = NULL; - } + tiling_window_tree_walk(_G.tinfo->tree, _restore_free_client); + _G.tinfo->tree = NULL; e_place_zone_region_smart_cleanup(z); } _G.tinfo->conf->nb_stacks = new_nb_stacks; @@ -1038,13 +1035,6 @@ e_modapi_init(E_Module *m) return m; } -void -_restore_free_client(void *client) -{ - _restore_client(client); - free(client); -} - static void _disable_desk(E_Desk *desk) { diff --git a/src/modules/tiling/e_mod_tiling.h b/src/modules/tiling/e_mod_tiling.h index ba6a72304..353af31f3 100644 --- a/src/modules/tiling/e_mod_tiling.h +++ b/src/modules/tiling/e_mod_tiling.h @@ -56,10 +56,6 @@ struct _Tiling_Info /* List of windows which were toggled floating */ Eina_List *floating_windows; - Eina_List *stacks[TILING_MAX_STACKS]; - int pos[TILING_MAX_STACKS]; - int size[TILING_MAX_STACKS]; - Window_Tree *tree; };