anv/wsi: Avoid stuck Wayland connection
[mesa.git] / src / vulkan / anv_wsi_wayland.c
index 5e8a3a56f6826933c5c1b642e1d32586712b6310..c8f9cf27ab343ac1e5924eaf84dd6922114f6f34 100644 (file)
@@ -536,8 +536,8 @@ wsi_wl_swapchain_acquire_next_image(struct anv_swapchain *anv_chain,
       /* This time we do a blocking dispatch because we can't go
        * anywhere until we get an event.
        */
-      int ret = wl_display_dispatch_queue(chain->display->display,
-                                          chain->queue);
+      int ret = wl_display_roundtrip_queue(chain->display->display,
+                                           chain->queue);
       if (ret < 0)
          return vk_error(VK_ERROR_OUT_OF_DATE_KHR);
    }