From d2c2f48bec064fa608e77c6bf5a77d88ab2a9994 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Fri, 4 Aug 2017 16:23:38 -0400 Subject: [PATCH] break out client rescaling into separate function --- src/bin/e_comp.c | 27 +++++++++++++++++++++++++++ src/bin/e_comp.h | 2 ++ src/bin/e_comp_canvas.c | 22 +--------------------- 3 files changed, 30 insertions(+), 21 deletions(-) diff --git a/src/bin/e_comp.c b/src/bin/e_comp.c index 6113d125c..3aee85ff3 100644 --- a/src/bin/e_comp.c +++ b/src/bin/e_comp.c @@ -1806,3 +1806,30 @@ e_comp_util_object_is_above_nocomp(Evas_Object *obj) return EINA_TRUE; return EINA_FALSE; } + +E_API void +e_comp_clients_rescale(void) +{ + int i; + + for (i = 0; i < 11; i++) + { + Eina_List *tmp = NULL; + E_Client *ec; + + if (!e_comp->layers[i].clients) continue; + /* Make temporary list as e_client_res_change_geometry_restore + * rearranges the order. */ + EINA_INLIST_FOREACH(e_comp->layers[i].clients, ec) + { + if ((!e_client_util_ignored_get(ec)) && (!e_object_is_del(E_OBJECT(ec)))) + tmp = eina_list_append(tmp, ec); + } + + EINA_LIST_FREE(tmp, ec) + { + e_client_res_change_geometry_save(ec); + e_client_res_change_geometry_restore(ec); + } + } +} diff --git a/src/bin/e_comp.h b/src/bin/e_comp.h index 5632ff188..48e2f21de 100644 --- a/src/bin/e_comp.h +++ b/src/bin/e_comp.h @@ -235,6 +235,8 @@ E_API E_Config_Dialog *e_int_config_comp_match(Evas_Object *parent, const char * E_API Eina_Bool e_comp_util_kbd_grabbed(void); E_API Eina_Bool e_comp_util_mouse_grabbed(void); +E_API void e_comp_clients_rescale(void); + static inline Eina_Bool e_comp_util_client_is_fullscreen(const E_Client *ec) { diff --git a/src/bin/e_comp_canvas.c b/src/bin/e_comp_canvas.c index 5fe089a9e..36dcbf05d 100644 --- a/src/bin/e_comp_canvas.c +++ b/src/bin/e_comp_canvas.c @@ -580,7 +580,6 @@ e_comp_canvas_update(void) Eina_List *l, *screens, *zones = NULL, *ll; E_Zone *zone; E_Screen *scr; - int i; Eina_Bool changed = EINA_FALSE; screens = (Eina_List *)e_xinerama_screens_get(); @@ -674,26 +673,7 @@ e_comp_canvas_update(void) } } - for (i = 0; i < 11; i++) - { - Eina_List *tmp = NULL; - E_Client *ec; - - if (!e_comp->layers[i].clients) continue; - /* Make temporary list as e_client_res_change_geometry_restore - * rearranges the order. */ - EINA_INLIST_FOREACH(e_comp->layers[i].clients, ec) - { - if ((!e_client_util_ignored_get(ec)) && (!e_object_is_del(E_OBJECT(ec)))) - tmp = eina_list_append(tmp, ec); - } - - EINA_LIST_FREE(tmp, ec) - { - e_client_res_change_geometry_save(ec); - e_client_res_change_geometry_restore(ec); - } - } + e_comp_clients_rescale(); if (!changed) return; if (!starting) {