diff options
author | Tom Hacohen <tom@stosb.com> | 2014-01-17 17:13:22 +0000 |
---|---|---|
committer | Tom Hacohen <tom@stosb.com> | 2014-01-30 15:22:02 +0000 |
commit | 7de64fae0808512d813e24536ce02126cab63827 (patch) | |
tree | 3774ec3e4ae55c12cef4ef47da3bba8da3231382 | |
parent | fca44a5091d71ae203dd7f01e9a56addc813a74d (diff) | |
download | enlightenment-7de64fae0808512d813e24536ce02126cab63827.tar.gz |
Tiling2: Have a desk walker function and use it.
-rw-r--r-- | src/modules/tiling2/e_mod_tiling.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/src/modules/tiling2/e_mod_tiling.c b/src/modules/tiling2/e_mod_tiling.c index ac50059774..8e7036f93b 100644 --- a/src/modules/tiling2/e_mod_tiling.c +++ b/src/modules/tiling2/e_mod_tiling.c @@ -34,6 +34,7 @@ struct tiling_g tiling_g = { static void _add_client(E_Client *ec); static void _remove_client(E_Client *ec); +static void _foreach_desk(void (*func)(E_Desk *desk)); /* }}} */ /* Globals {{{ */ @@ -1284,6 +1285,22 @@ _disable_all_tiling(void) const Eina_List *l, *ll; E_Comp *comp; E_Zone *zone; + + _foreach_desk(_disable_desk); + + EINA_LIST_FOREACH(e_comp_list(), l, comp) { + EINA_LIST_FOREACH(comp->zones, ll, zone) { + e_place_zone_region_smart_cleanup(zone); + } + } +} + +static void +_foreach_desk(void (*func)(E_Desk *desk)) +{ + const Eina_List *l, *ll; + E_Comp *comp; + E_Zone *zone; E_Desk *desk; int x, y; @@ -1293,10 +1310,9 @@ _disable_all_tiling(void) for (y = 0; y < zone->desk_y_count; y++) { desk = zone->desks[x + (y * zone->desk_x_count)]; - _disable_desk(desk); + func(desk); } } - e_place_zone_region_smart_cleanup(zone); } } } |