mirror of https://github.com/mpv-player/mpv
wayland: always do a display_roundtrip at the end of init
We really need two roundtrips in the init function. The first one is for running the registry and then second one is for ensuring the xdg_surface and other potential wayland objects are configured at least once before mpv does anything. We've been getting away with only doing the first for a while via luck, but really we should do at least one more wait on the compositor. Fixes #10791 (half of it).
This commit is contained in:
parent
0f1ae8896e
commit
99699cd7ba
|
@ -1992,6 +1992,10 @@ int vo_wayland_init(struct vo *vo)
|
|||
wl_callback_add_listener(wl->frame_callback, &frame_listener, wl);
|
||||
wl_surface_commit(wl->surface);
|
||||
|
||||
/* Do another roundtrip to ensure all of the above is initialized
|
||||
* before mpv does anything else. */
|
||||
wl_display_roundtrip(wl->display);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue