static bool __manual_render;
static bool __iconified = false;
static bool __is_bound = false;
-static bool __viewer_visibility = false;
+static int __viewer_visibility = AUL_SCREEN_STATUS_PAUSE;
static GList *__dead_cbs;
struct dead_cb_s {
};
GQueue *__pending_queue;
-static int __change_viewer_visibility(bool visible, bool update_cur_state);
+static int __change_viewer_visibility(int visibility, bool update_cur_state);
static int __change_visibility(bool visible);
static GDBusConnection *__gdbus_conn;
static guint __lcd_subscribe_id;
return;
}
- __change_viewer_visibility(true, false);
+ __change_viewer_visibility(AUL_SCREEN_STATUS_PRE_RESUME, false);
ecore_evas_manual_render_set(ee, EINA_TRUE);
if (cur_image)
ecore_evas_manual_render_set(ee, EINA_FALSE);
LOGI("set manual false");
- if (!__viewer_visibility)
- __change_viewer_visibility(__viewer_visibility, false);
-
auto_visibility = screen_connector_toolkit_evas_auto_visibility(__toolkit);
if (auto_visibility == VISIBILITY_TYPE_PARTIALLY_OBSCURED ||
auto_visibility == VISIBILITY_TYPE_UNOBSCURED)
return 0;
}
-static int __change_viewer_visibility(bool visible, bool update_cur_state)
+static int __change_viewer_visibility(int visibility, bool update_cur_state)
{
Evas_Object *watch;
- int status;
int r;
- if (visible)
- status = AUL_SCREEN_STATUS_RESUME;
- else
- status = AUL_SCREEN_STATUS_PAUSE;
-
if (__win == NULL) {
_E("Window is NULL");
- __push_pending_queue(status);
+ __push_pending_queue(visibility);
return 0;
}
watch = evas_object_data_get(__win, "tbm,watch");
if (watch == NULL || __watch_appid == NULL) {
_E("watch is not added");
- __push_pending_queue(status);
+ __push_pending_queue(visibility);
return 0;
}
screen_connector_toolkit_evas_get_rid(watch, (int *)&__watch_rid);
}
- r = aul_screen_connector_update_screen_viewer_status(status, __watch_rid);
+ r = aul_screen_connector_update_screen_viewer_status(visibility, __watch_rid);
if (r < 0) {
_E("Failed to update screen viewer status");
return -1;
}
- _D("send watch control status to %s:%d", __watch_appid, status);
+ _D("send watch control status to %s:%d", __watch_appid, visibility);
if (update_cur_state)
- __viewer_visibility = visible;
+ __viewer_visibility = visibility;
return 0;
}
API int watch_manager_notify_resumed_status_of_viewer(void)
{
- return __change_viewer_visibility(true, true);
+ return __change_viewer_visibility(AUL_SCREEN_STATUS_RESUME, true);
}
API int watch_manager_notify_paused_status_of_viewer(void)
{
- return __change_viewer_visibility(false, true);
+ return __change_viewer_visibility(AUL_SCREEN_STATUS_PAUSE, true);
}
static int __change_visibility(bool visible)