xwayland: Use do-while loop

Signed-off-by: xurui <xurui@kylinos.cn>
This commit is contained in:
xurui 2024-01-03 16:36:20 +08:00
parent 37539cb0bf
commit 3268a83ae1

View File

@ -687,9 +687,9 @@ xwl_screen_roundtrip(struct xwl_screen *xwl_screen)
{
int ret;
ret = wl_display_roundtrip(xwl_screen->display);
while (ret >= 0 && xwl_screen->expecting_event)
do {
ret = wl_display_roundtrip(xwl_screen->display);
} while (ret >= 0 && xwl_screen->expecting_event);
if (ret < 0)
xwl_give_up("could not connect to wayland server\n");