diff --git a/libweston-desktop/xdg-shell-v5.c b/libweston-desktop/xdg-shell-v5.c index 77d004e1..dd360862 100644 --- a/libweston-desktop/xdg-shell-v5.c +++ b/libweston-desktop/xdg-shell-v5.c @@ -481,8 +481,10 @@ weston_desktop_xdg_surface_protocol_ack_configure(struct wl_client *wl_client, } else if (configure->serial == serial) { wl_list_remove(&configure->link); found = true; + break; + } else { + break; } - break; } if (!found) { struct weston_desktop_client *client = diff --git a/libweston-desktop/xdg-shell-v6.c b/libweston-desktop/xdg-shell-v6.c index 1344dda0..10274e07 100644 --- a/libweston-desktop/xdg-shell-v6.c +++ b/libweston-desktop/xdg-shell-v6.c @@ -1106,8 +1106,10 @@ weston_desktop_xdg_surface_protocol_ack_configure(struct wl_client *wl_client, } else if (configure->serial == serial) { wl_list_remove(&configure->link); found = true; + break; + } else { + break; } - break; } if (!found) { struct weston_desktop_client *client =