- 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 <joonbum.ko@samsung.com>
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;
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.");