void *data;
};
-GQueue *__pending_queue;
+static bool __is_pended;
static int __change_viewer_visibility(int visibility, bool update_cur_state);
static int __change_visibility(int visibility);
static aul_app_com_connection_h __conn_launch_signal;
{
int r;
- _D("send pending event(%d) to %s:%u", status, __watch_appid, surf);
+ _W("Send pending event(%d) to %s:%u", status, __watch_appid, surf);
r = aul_screen_connector_update_screen_viewer_status(status, surf);
if (r < 0)
_E("Failed to update screen viewer status");
static void __flush_pending_queue(unsigned int surf)
{
- gpointer status_pointer;
- int status;
-
- if (!__pending_queue) {
- _D("Pending queue is empty");
+ if (!__is_pended)
return;
- }
- while (!g_queue_is_empty(__pending_queue)) {
- status_pointer = g_queue_pop_head(__pending_queue);
- status = GPOINTER_TO_INT(status_pointer);
- __process_pending_status(status, surf);
- }
-
- g_queue_free(__pending_queue);
- __pending_queue = NULL;
+ __process_pending_status(__viewer_visibility, surf);
+ __is_pended = false;
}
static void __push_pending_queue(int status)
{
- if (!__pending_queue)
- __pending_queue= g_queue_new();
-
- if (!__pending_queue) {
- _E("Out of memory");
- return;
- }
-
- g_queue_push_tail(__pending_queue, GINT_TO_POINTER(status));
- _D("status(%d)", status);
+ __is_pended = true;
+ _W("status(%d)", status);
}
static void __win_resized(void *data, Evas *e, Evas_Object *obj, void *event_info)