static void
_e_client_free(E_Client *ec)
{
- Eina_List *l, *ll;
- E_Client *ec2;
- EINA_LIST_FOREACH_SAFE(e_comp->post_updates, l, ll, ec2)
- {
- if (ec2 == ec)
- e_comp->post_updates = eina_list_remove_list(e_comp->post_updates, l);
- }
+ e_comp_post_update_purge(ec);
e_comp_object_redirected_set(ec->frame, 0);
e_comp_object_render_update_del(ec->frame);
/* clear update flag */
e_comp_object_render_update_del(ec->frame);
if (_e_comp_client_update(ec))
- {
- c->post_updates = eina_list_append(c->post_updates, ec);
- e_object_ref(E_OBJECT(ec));
- }
+ e_comp_post_update_add(ec);
}
_e_comp_fps_update(c);
if (conf->fps_show)
extern EAPI E_Comp *e_comp;
+EAPI void e_comp_post_update_add(E_Client *ec);
+EAPI void e_comp_post_update_purge(E_Client *ec);
#endif
#endif
LAYER_MAP(E_LAYER_CLIENT_NOTIFICATION_HIGH);
return E_LAYER_CLIENT_ALERT;
}
+
+EAPI void
+e_comp_post_update_add(E_Client *ec)
+{
+ Eina_List *l, *ll;
+ E_Client *ec2;
+
+ if (!e_comp) return;
+
+ ec2 = eina_list_data_find(e_comp->post_updates, ec);
+ if (ec2) return;
+
+ e_comp->post_updates = eina_list_append(e_comp->post_updates, ec);
+ e_object_ref(E_OBJECT(ec));
+}
+
+EAPI void
+e_comp_post_update_purge(E_Client *ec)
+{
+ Eina_List *l, *ll;
+ E_Client *ec2;
+
+ if (!e_comp) return;
+
+ EINA_LIST_FOREACH_SAFE(e_comp->post_updates, l, ll, ec2)
+ {
+ if (ec2 == ec)
+ e_comp->post_updates = eina_list_remove_list(e_comp->post_updates, l);
+ }
+}
/* schedule repaint */
if (e_pixmap_refresh(ec->pixmap))
- {
- Eina_List *l, *ll;
- E_Client *ec2;
- EINA_LIST_FOREACH_SAFE(e_comp->post_updates, l, ll, ec2)
- {
- if (ec2 == ec)
- e_comp->post_updates = eina_list_remove_list(e_comp->post_updates, l);
- }
- e_comp->post_updates = eina_list_append(e_comp->post_updates, ec);
- e_object_ref(E_OBJECT(ec));
- }
+ e_comp_post_update_add(ec);
}
static void
/* schedule repaint */
if (e_pixmap_refresh(ec->pixmap))
- {
- Eina_List *l, *ll;
- E_Client *ec2;
- EINA_LIST_FOREACH_SAFE(e_comp->post_updates, l, ll, ec2)
- {
- if (ec2 == ec)
- e_comp->post_updates = eina_list_remove_list(e_comp->post_updates, l);
- }
- e_comp->post_updates = eina_list_append(e_comp->post_updates, ec);
- e_object_ref(E_OBJECT(ec));
- }
+ e_comp_post_update_add(ec);
if (!e_pixmap_usable_get(ec->pixmap))
{