From: joonbum.ko Date: Fri, 18 Aug 2017 01:46:56 +0000 (+0900) Subject: tpl_wayland_egl_thread: Fixed an error related to prepared flag. X-Git-Tag: accepted/tizen/unified/20170818.155008~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5ca4e4b40b2ccbef718540f71a5216e65c5bdf88;p=platform%2Fcore%2Fuifw%2Flibtpl-egl.git tpl_wayland_egl_thread: Fixed an error related to prepared flag. - The code that set prepared to TRUE was wrong. - Fixed an issue where wl_display_cancel_read() could be called multiple times, even if wl_display_prepare_read_queue was only called once due to the prepared flag. Change-Id: Ibdbe92ed3bbe00ffac6570fac5f76cf8f243d706 Signed-off-by: joonbum.ko --- diff --git a/src/tpl_wayland_egl_thread.c b/src/tpl_wayland_egl_thread.c index 2e09c08..6f5f608 100644 --- a/src/tpl_wayland_egl_thread.c +++ b/src/tpl_wayland_egl_thread.c @@ -332,10 +332,10 @@ _twe_thread_wl_disp_prepare(GSource *source, gint *time) disp_source->ev_queue) == -1) { _twe_display_print_err(disp_source, "dispatch_queue_pending"); } - - disp_source->prepared = TPL_TRUE; } + disp_source->prepared = TPL_TRUE; + wl_display_flush(disp_source->disp); *time = -1; @@ -353,6 +353,9 @@ _twe_thread_wl_disp_check(GSource *source) return ret; } + if (!disp_source->prepared) + return ret; + if (disp_source->gfd.revents & G_IO_IN) { if (wl_display_read_events(disp_source->disp) == -1) _twe_display_print_err(disp_source, "read_event.");