break out client rescaling into separate function

This commit is contained in:
Mike Blumenkrantz 2017-08-04 16:23:38 -04:00
parent 7a3876ffc9
commit d2c2f48bec
3 changed files with 30 additions and 21 deletions

View File

@ -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);
}
}
}

View File

@ -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)
{

View File

@ -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)
{