Call wl_display_dispatch_queue_pending before checking dequeuable. 39/64139/2
authorjoonbum.ko <joonbum.ko@samsung.com>
Wed, 30 Mar 2016 08:17:18 +0000 (17:17 +0900)
committerJoonbum Ko <joonbum.ko@samsung.com>
Mon, 4 Apr 2016 04:07:00 +0000 (21:07 -0700)
 - Before the dequeuable checking, call the function  wl_display_dispatch_queue_pending() in order to process the accumulated events(release) received from server.

Change-Id: I92abae0ae6fdda80367c2193d0926b5c1637d24e

src/tpl_wayland.c

index 5472ef9..c48fa03 100644 (file)
@@ -567,6 +567,9 @@ __tpl_wayland_surface_dequeue_buffer(tpl_surface_t *surface)
        }
 
        TPL_OBJECT_UNLOCK(surface);
+       wl_display_dispatch_queue_pending((struct wl_display *)surface->display->native_handle,
+                                         wayland_display->wl_queue);
+
        while (tbm_surface_queue_can_dequeue(
                       wayland_surface->tbm_queue, 0) == 0) {
                /* Application sent all buffers to the server. Wait for server response. */