struct watch_app_context __context;
static double __prev_target_tick = -1;
+static Evas_Object *__watch_win;
static void __on_ambient_tick(void *watchtime, void *data);
static void __on_ambient_changed(int ambient, void *data);
}
/* LCOV_EXCL_STOP */
+static void __on_pre_resume(void *data)
+{
+ int w, h;
+ Ecore_Evas *ee;
+ struct _watch_time_s timeinfo = {
+ .timezone = NULL
+ };
+
+ __get_timeinfo(&timeinfo);
+ __on_time_tick(&timeinfo, data);
+
+ if (timeinfo.timezone)
+ free(timeinfo.timezone);
+
+ if (__watch_win == NULL)
+ return;
+
+ ee = ecore_evas_ecore_evas_get(evas_object_evas_get(__watch_win));
+ evas_output_viewport_get(ecore_evas_get(ee), NULL, NULL, &w, &h);
+ evas_obscured_clear(ecore_evas_get(ee));
+ evas_damage_rectangle_add(ecore_evas_get(ee), 0, 0, w, h);
+ ecore_evas_manual_render(ee);
+}
+
static int __on_resume(void *data)
{
_W("_watch_core_resume");
__on_pause(NULL);
} else if (*state == AUL_SCREEN_STATUS_PRE_RESUME
&& __pre_resume_called == 0) {
- __get_timeinfo(&timeinfo);
_D("call pre resume tick");
- __on_time_tick(&timeinfo, NULL);
+ __on_pre_resume(NULL);
__pre_resume_called = 1;
}
char *plug_id;
plug_id = evas_object_data_del(obj, "___PLUGID");
free(plug_id);
+
+ if (__watch_win == obj)
+ __watch_win = NULL;
}
EXPORT_API int watch_app_get_elm_win(Evas_Object **win)
evas_object_event_callback_add(ret_win, EVAS_CALLBACK_DEL, __win_del_cb, NULL);
*win = ret_win;
+ __watch_win = ret_win;
+
return APP_ERROR_NONE;
}