void Entry::check_cursor_blink()
{
+ const Part *cursor_part = style->get_part("cursor");
+ bool has_blink = (cursor_part && cursor_part->get_graphic(ACTIVE|FOCUS)!=cursor_part->get_graphic(NORMAL|FOCUS));
+
cursor_blink = (state&FOCUS);
- if((state&FOCUS) && style)
+ if((state&FOCUS) && style && has_blink)
{
- const Part *cursor_part = style->get_part("cursor");
- if(cursor_part && cursor_part->get_graphic(ACTIVE|FOCUS)!=cursor_part->get_graphic(NORMAL|FOCUS))
- {
- set_animation_interval(Time::sec/2);
- return;
- }
+ set_animation_interval(Time::sec/2);
+ mark_rebuild();
+ }
+ else
+ {
+ if(has_blink)
+ mark_rebuild();
+ stop_animation();
}
-
- stop_animation();
}
void Entry::check_view_range()