forked from enlightenment/efl
efl/cserve2: Fix some bugs regarding fonts
Signed-off-by: Paulo Alcantara <pcacjr@profusion.mobi> SVN revision: 81582
This commit is contained in:
parent
da061849b0
commit
fb97c82882
|
@ -991,10 +991,10 @@ _entry_free_cb(void *data)
|
|||
static void
|
||||
_font_entry_reference_del(Client *client, Font_Entry *fe)
|
||||
{
|
||||
Eina_List *l;
|
||||
Eina_List *l, *l_next;
|
||||
Reference *ref;
|
||||
|
||||
EINA_LIST_FOREACH(client->fonts.referencing, l, ref)
|
||||
EINA_LIST_FOREACH_SAFE(client->fonts.referencing, l, l_next, ref)
|
||||
{
|
||||
if (ref->entry == (Entry *)fe)
|
||||
{
|
||||
|
@ -1203,12 +1203,12 @@ _font_load_request_response(Font_Entry *fe, Slave_Msg_Font_Loaded *msg, int *siz
|
|||
static void
|
||||
_font_load_request_failed(Font_Entry *fe, Error_Type error EINA_UNUSED)
|
||||
{
|
||||
Eina_List *l;
|
||||
Eina_List *l, *l_next;
|
||||
Reference *ref;
|
||||
|
||||
if (fe->base.request) fe->base.request = NULL;
|
||||
|
||||
EINA_LIST_FOREACH(fe->base.references, l, ref)
|
||||
EINA_LIST_FOREACH_SAFE(fe->base.references, l, l_next, ref)
|
||||
_font_entry_reference_del(ref->client, fe);
|
||||
}
|
||||
|
||||
|
|
|
@ -993,13 +993,29 @@ evas_cserve2_font_load(const char *source, const char *name, int size, int dpi,
|
|||
return fe;
|
||||
}
|
||||
|
||||
static inline int
|
||||
_font_load_wait(Font_Entry *fe)
|
||||
{
|
||||
_server_dispatch_until(fe->rid);
|
||||
|
||||
if (fe->failed) return CSERVE2_GENERIC;
|
||||
|
||||
return CSERVE2_NONE;
|
||||
}
|
||||
|
||||
void
|
||||
evas_cserve2_font_free(Font_Entry *fe)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if (!fe) return;
|
||||
|
||||
if (fe->failed)
|
||||
return;
|
||||
ret = _font_load_wait(fe);
|
||||
if (ret == CSERVE2_GENERIC)
|
||||
{
|
||||
ERR("Failed to wait loading font '%s'.", fe->name);
|
||||
return;
|
||||
}
|
||||
|
||||
_font_load_server_send(fe, CSERVE2_FONT_UNLOAD);
|
||||
|
||||
|
|
Loading…
Reference in New Issue