elm_win.c: focus animation refactoring.

This commit is contained in:
Daniel Juyung Seo 2013-08-15 22:42:59 +09:00
parent 4e1989433e
commit 50939d8f25
1 changed files with 4 additions and 8 deletions

View File

@ -784,6 +784,8 @@ _elm_win_focus_highlight_reconfigure(Elm_Win_Smart_Data *sd)
str = edje_object_data_get(sd->focus_highlight.fobj, "animate"); str = edje_object_data_get(sd->focus_highlight.fobj, "animate");
sd->focus_highlight.animate_supported = ((str) && (!strcmp(str, "on"))); sd->focus_highlight.animate_supported = ((str) && (!strcmp(str, "on")));
} }
else
sd->focus_highlight.animate_supported = EINA_FALSE;
} }
if ((sd->focus_highlight.animate_supported) && (previous) && if ((sd->focus_highlight.animate_supported) && (previous) &&
@ -5119,20 +5121,14 @@ _focus_highlight_animate_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
{ {
Eina_Bool animate = va_arg(*list, int); Eina_Bool animate = va_arg(*list, int);
Elm_Win_Smart_Data *sd = _pd; Elm_Win_Smart_Data *sd = _pd;
const char *str;
animate = !!animate; animate = !!animate;
if (sd->focus_highlight.animate == animate) if (sd->focus_highlight.animate == animate)
return; return;
sd->focus_highlight.animate = animate; sd->focus_highlight.animate = animate;
if (animate) sd->focus_highlight.theme_changed = EINA_TRUE;
{ _elm_win_focus_highlight_reconfigure_job_start(sd);
str = edje_object_data_get(sd->focus_highlight.fobj, "animate");
sd->focus_highlight.animate_supported = ((str) && (!strcmp(str, "on")));
}
else
sd->focus_highlight.animate_supported = EINA_FALSE;
} }
EAPI Eina_Bool EAPI Eina_Bool