wayland: wait for initial surface configure before attaching buffer - #18350
Conversation
5f369fe to
0fb4f13
Compare
|
This change fixes issue #18347 for me. During testing I noticed that mpv apparently does not exit with an error code when the issue happens, or am I holding my bash wrong? |
Dudemanguy
left a comment
There was a problem hiding this comment.
Guess this is what has to be done here.
| /* Do another roundtrip to ensure all of the above is initialized | ||
| * before mpv does anything else. */ | ||
| wl_display_roundtrip(wl->display); |
There was a problem hiding this comment.
Why is this removed? wl_display_dispatch by itself does not ensure this.
There was a problem hiding this comment.
roundtrip ensures the compositor has seen previous requests. The compositor can't actually configure our surface if it hasn't seen previous requests, so I think dispatching until surface configure implies it.
Receiving the initial configure means the initial commit was processed, and because requests are processed in order, everything preceding that commit was processed.
There was a problem hiding this comment.
OK. Please add some comments so no one will insert any requests between wl_surface_commit and this.
There was a problem hiding this comment.
wl_display_roundtrip internally does wl_display_dispatch.
0fb4f13 to
b74231f
Compare
Fixes #18347