Skip to content
This repository has been archived by the owner on Nov 1, 2021. It is now read-only.

Commit

Permalink
examples/dmabuf-capture: add extra roundtrip for wl_output listener
Browse files Browse the repository at this point in the history
This example was relying on wl_display_dispatch being enough to fetch
output information. This worked by chance.

Add an explicit wl_display_roundtrip.

Other examples don't setup wl_output listeners, so they should be fine.

Fixes: 297354f ("Remove unnecessary wl_display_dispatch calls")
Closes: #2386
  • Loading branch information
emersion authored and ddevault committed Aug 31, 2020
1 parent b0144c7 commit 2b418b4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions examples/dmabuf-capture.c
Original file line number Diff line number Diff line change
Expand Up @@ -753,6 +753,10 @@ static int init(struct capture_context *ctx) {
ctx->registry = wl_display_get_registry(ctx->display);
wl_registry_add_listener(ctx->registry, &registry_listener, ctx);

// First roundtrip to fetch globals
wl_display_roundtrip(ctx->display);

// Second roundtrip to fetch wl_output information
wl_display_roundtrip(ctx->display);

if (!ctx->export_manager) {
Expand Down

0 comments on commit 2b418b4

Please sign in to comment.