clients/simple-egl: simplify wait for configure loop

Just move the init function outside of the loop and we can drop the
if/continue.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This commit is contained in:
Derek Foreman 2024-10-18 14:06:01 -05:00 committed by Marius Vlad
parent 80e47a7161
commit 16dc3b2b7f

View file

@ -1474,15 +1474,10 @@ main(int argc, char **argv)
create_surface(&window);
/* we already have wait_for_configure set after create_surface() */
while (running && ret != -1 && window.wait_for_configure) {
while (running && ret != -1 && window.wait_for_configure)
ret = wl_display_dispatch(display.display);
/* wait until xdg_surface::configure acks the new dimensions */
if (window.wait_for_configure)
continue;
init_gl(&window);
}
display.cursor_surface =
wl_compositor_create_surface(display.compositor);