+ else {
+ /* NOTE quick fix
+ * Sync type event from display-thread(main thread) can't be
+ * handled. In this way, if we call tdm_thread_send_cb() with
+ * 'cb_base->sync = 1', then libtdm will eveventually raise
+ * abort(). Please see commit '4abfab36' for more detail.
+ */
+ cb_base->sync = 0;
+ ret = tdm_thread_send_cb(private_display->private_loop, cb_base);
+ TDM_RETURN_VAL_IF_FAIL(ret == TDM_ERROR_NONE, TDM_ERROR_OPERATION_FAILED);
+ cb_base->sync = 1;
+
+ /* if waiting_tid is not 0, it means there are two sync-type events at the same time.
+ * and it would make deadlock issue.
+ */
+ assert(waiting_tid == 0);
+