}
////////////////////////////////////////////////
+static void
+_e_client_aux_hint_eval(E_Client *ec)
+{
+ if (!ec) return;
+
+#ifdef HAVE_WAYLAND_ONLY
+ E_Comp_Wl_Client_Data *cdata = (E_Comp_Wl_Client_Data*)ec->comp_data;
+ Eina_List *l, *ll;
+ E_Comp_Wl_Aux_Hint *hint;
+
+ if (cdata && cdata->aux_hint.changed)
+ {
+ _e_client_hook_call(E_CLIENT_HOOK_AUX_HINT_CHANGE, ec);
+
+ EINA_LIST_FOREACH_SAFE(cdata->aux_hint.hints, l, ll, hint)
+ {
+ hint->changed = EINA_FALSE;
+ if (hint->deleted)
+ {
+ ELOGF("COMP", "AUX_HINT |Del [%d:%s:%s]", ec->pixmap, ec, hint->id, hint->hint, hint->val);
+ if (hint->hint) eina_stringshare_del(hint->hint);
+ if (hint->val) eina_stringshare_del(hint->val);
+ cdata->aux_hint.hints = eina_list_remove_list(cdata->aux_hint.hints, l);
+ E_FREE(hint);
+ }
+ }
+ cdata->aux_hint.changed = 0;
+ }
+#endif
+}
static void
_e_client_eval(E_Client *ec)
_e_client_event_property(ec, prop);
}
-#ifdef HAVE_WAYLAND_ONLY
- {
- E_Comp_Wl_Client_Data *cdata = (E_Comp_Wl_Client_Data*)ec->comp_data;
-
- if (cdata && cdata->aux_hint.changed)
- {
- _e_client_hook_call(E_CLIENT_HOOK_AUX_HINT_CHANGE, ec);
- cdata->aux_hint.changed = 0;
- }
- }
-#endif
+ _e_client_aux_hint_eval(ec);
e_client_transform_core_update(ec);
_e_client_hook_call(E_CLIENT_HOOK_EVAL_END, ec);
return NULL;
}
-#ifdef HAVE_WAYLAND_ONLY
- {
- E_Comp_Wl_Client_Data *cdata = (E_Comp_Wl_Client_Data*)ec->comp_data;
-
- if (cdata && cdata->aux_hint.changed)
- {
- _e_client_hook_call(E_CLIENT_HOOK_AUX_HINT_CHANGE, ec);
- cdata->aux_hint.changed = 0;
- }
- }
-#endif
+ _e_client_aux_hint_eval(ec);
if (ec->override)
_e_client_zone_update(ec);
id, hint->hint, hint->val, val);
eina_stringshare_del(hint->val);
hint->val = eina_stringshare_add(val);
+ hint->changed = EINA_TRUE;
+ if (hint->deleted)
+ hint->deleted = EINA_FALSE;
cdata->aux_hint.changed = 1;
}
found = EINA_TRUE;
hint->id = id;
hint->hint = eina_stringshare_add(name);
hint->val = eina_stringshare_add(val);
+ hint->changed = EINA_TRUE;
+ hint->deleted = EINA_FALSE;
cdata->aux_hint.hints = eina_list_append(cdata->aux_hint.hints, hint);
cdata->aux_hint.changed = 1;
ELOGF("COMP", "AUX_HINT |Add [%d:%s:%s]", cp, e_pixmap_client_get(cp),
id, hint->hint, hint->val, val);
eina_stringshare_del(hint->val);
hint->val = eina_stringshare_add(val);
+ hint->changed = EINA_TRUE;
cdata->aux_hint.changed = 1;
}
+
+ if (hint->deleted)
+ hint->deleted = EINA_FALSE;
+
found = EINA_TRUE;
break;
}
E_Comp_Wl_Client_Data *cdata;
Eina_List *l, *ll;
E_Comp_Wl_Aux_Hint *hint;
- unsigned int res = -1;
+ int res = -1;
if (!cp) return EINA_FALSE;
cdata = (E_Comp_Wl_Client_Data*)e_pixmap_cdata_get(cp);
{
if (hint->id == id)
{
- ELOGF("COMP", "AUX_HINT |Del [%d:%s:%s]", cp, e_pixmap_client_get(cp), id, hint->hint, hint->val);
- if (hint->hint) eina_stringshare_del(hint->hint);
- if (hint->val) eina_stringshare_del(hint->val);
- cdata->aux_hint.hints = eina_list_remove_list(cdata->aux_hint.hints, l);
+ ELOGF("COMP", "AUX_HINT |Del (pending) [%d:%s:%s]", cp, e_pixmap_client_get(cp), id, hint->hint, hint->val);
+ hint->changed = EINA_TRUE;
+ hint->deleted = EINA_TRUE;
cdata->aux_hint.changed = 1;
res = hint->id;
- E_FREE(hint);
break;
}
}
- return !!res;
+ if (res == -1)
+ return EINA_FALSE;
+ else
+ return EINA_TRUE;
#endif
return EINA_FALSE;
EINA_LIST_FOREACH(cdata->aux_hint.hints, l, hint)
{
- if (!strcmp(hint->hint, name))
+ if ((!hint->deleted) &&
+ (!strcmp(hint->hint, name)))
{
res = hint->val;
break;