__appcore_timer_del(ui);
#endif
- if (ui->state == AS_PAUSED || ui->state == AS_CREATED) {
+ if (ui->state == AS_PAUSED || ui->state == AS_CREATED ||
+ ui->state == AS_NONE) {
_DBG("[APP %d] RESUME", _pid);
if (ui->ops->resume) {
traceBegin(TTRACE_TAG_APPLICATION_MANAGER,
#endif
}
+static void __del_climsg_cb(struct ui_priv *ui)
+{
+ if (ui->hshow) {
+ ecore_event_handler_del(ui->hshow);
+ ui->hshow = NULL;
+ }
+
+ if (ui->hhide) {
+ ecore_event_handler_del(ui->hhide);
+ ui->hhide = NULL;
+ }
+
+ if (ui->hvchange) {
+ ecore_event_handler_del(ui->hvchange);
+ ui->hvchange = NULL;
+ }
+
+#if defined(WAYLAND)
+ if (ui->hlower) {
+ ecore_event_handler_del(ui->hlower);
+ ui->hlower = NULL;
+ }
+
+ if (ui->hpvchange) {
+ ecore_event_handler_del(ui->hpvchange);
+ ui->hpvchange = NULL;
+ }
+#elif defined(X11)
+ if (ui->hcmsg) {
+ ecore_event_handler_del(ui->hcmsg);
+ ui->hcmsg = NULL;
+ }
+#endif
+}
+
static int __before_loop(struct ui_priv *ui, int *argc, char ***argv)
{
int r;
}
LOG(LOG_DEBUG, "LAUNCH", "[%s:Platform:appcore_init:done]", ui->name);
+ __add_climsg_cb(ui);
if (ui->ops && ui->ops->create) {
traceBegin(TTRACE_TAG_APPLICATION_MANAGER, "APPCORE:CREATE");
r = ui->ops->create(ui->ops->data);
ui->ops->terminate(ui->ops->data);
traceEnd(TTRACE_TAG_APPLICATION_MANAGER);
}
+ __del_climsg_cb(ui);
errno = ECANCELED;
return -1;
}
}
ui->state = AS_CREATED;
- __add_climsg_cb(ui);
-
return 0;
}
ui->state = AS_DYING;
- if (ui->hshow)
- ecore_event_handler_del(ui->hshow);
- if (ui->hhide)
- ecore_event_handler_del(ui->hhide);
- if (ui->hvchange)
- ecore_event_handler_del(ui->hvchange);
-#if defined(WAYLAND)
- if (ui->hlower)
- ecore_event_handler_del(ui->hlower);
- if (ui->hpvchange)
- ecore_event_handler_del(ui->hpvchange);
-#endif
-
+ __del_climsg_cb(ui);
__appcore_timer_del(ui);
__finish_wl();
elm_shutdown();