}
}
-
-static Eina_Bool __show_cb(void *data, int type, void *event)
-{
- Ecore_Wl_Event_Window_Show *ev = event;
- widget_context_s *cxt = __find_context_by_win(ev->win);
-
- LOGD("show %d %d", (unsigned int)ev->win, (unsigned int)ev->data[0]);
-
- if (cxt)
- __instance_resume(cxt->provider, cxt->id, UPDATE_ALL);
- else
- LOGE("unknown window error: %d", ev->win); /* LCOV_EXCL_LINE */
-
- return ECORE_CALLBACK_RENEW;
-}
-
-static Eina_Bool __hide_cb(void *data, int type, void *event)
-{
- Ecore_Wl_Event_Window_Hide *ev = event;
- widget_context_s *cxt = __find_context_by_win(ev->win);
-
-
- LOGD("hide %d", (unsigned int)ev->win);
-
- if (cxt)
- __instance_pause(cxt->provider, cxt->id, UPDATE_ALL);
- else
- LOGE("unknown window error: %d", ev->win); /* LCOV_EXCL_LINE */
-
- return ECORE_CALLBACK_RENEW;
-}
-
static Eina_Bool __visibility_cb(void *data, int type, void *event)
{
Ecore_Wl_Event_Window_Visibility_Change *ev = event;
return ECORE_CALLBACK_RENEW;
}
- if (cxt->state == WC_PAUSED && ev->fully_obscured == 0) {
+ if ((cxt->state == WC_READY || cxt->state == WC_PAUSED)
+ && ev->fully_obscured == 0) {
__instance_resume(cxt->provider, cxt->id, UPDATE_ALL);
} else if (cxt->state == WC_RUNNING && ev->fully_obscured == 1) {
__instance_pause(cxt->provider, cxt->id, UPDATE_ALL);
static void __add_climsg()
{
- ecore_event_handler_add(ECORE_WL_EVENT_WINDOW_SHOW, __show_cb, NULL);
- ecore_event_handler_add(ECORE_WL_EVENT_WINDOW_HIDE, __hide_cb, NULL);
ecore_event_handler_add(ECORE_WL_EVENT_WINDOW_VISIBILITY_CHANGE, __visibility_cb, NULL);
ecore_event_handler_add(ECORE_WL_EVENT_WINDOW_LOWER, __lower_cb, NULL);
ecore_event_handler_add(ECORE_WL_EVENT_WINDOW_CONFIGURE, __configure_cb, NULL);