diff options
author | Dudemanguy <random342@airmail.cc> | 2022-10-26 21:44:23 -0500 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2022-10-28 02:36:46 +0000 |
commit | 99699cd7baa6be8aa949eab39a3964c102202180 (patch) | |
tree | beac8037bd1c8d923fd53f8b2194247e98b472f2 /video/out | |
parent | 0f1ae8896e8fbdd9f928f972f6ba04641f20536e (diff) | |
download | mpv-99699cd7baa6be8aa949eab39a3964c102202180.tar.bz2 mpv-99699cd7baa6be8aa949eab39a3964c102202180.tar.xz |
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).
Diffstat (limited to 'video/out')
-rw-r--r-- | video/out/wayland_common.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/video/out/wayland_common.c b/video/out/wayland_common.c index fb03c08021..7ec852c14e 100644 --- a/video/out/wayland_common.c +++ b/video/out/wayland_common.c @@ -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; } |