From 3268a83ae18dc95548ad1970a117d34274466e37 Mon Sep 17 00:00:00 2001 From: xurui Date: Wed, 3 Jan 2024 16:36:20 +0800 Subject: [PATCH] xwayland: Use do-while loop Signed-off-by: xurui --- hw/xwayland/xwayland-screen.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/xwayland/xwayland-screen.c b/hw/xwayland/xwayland-screen.c index 41bf89d9f..099207855 100644 --- a/hw/xwayland/xwayland-screen.c +++ b/hw/xwayland/xwayland-screen.c @@ -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");