Commit e3715527 authored by Derek Foreman's avatar Derek Foreman

libweston-desktop/xdg-shell: Properly properly handle ack_configure

commit 749637a8
introduced this feature, but the break is outside of any conditional
so only the first item in the list is ever tested.

If a client skips a few configures and then acks the most recent
it's still operating within spec, so the break should only occur
when a match is found.

This version also adds a break after we miss the target, as a tiny
optimization (the list will be cleaned up on disconnect anyway),
as it makes the code no more difficult to read or maintain.
Signed-off-by: default avatarDerek Foreman <derekf@osg.samsung.com>
Reviewed-by: Quentin Glidic's avatarQuentin Glidic <sardemff7+git@sardemff7.net>
parent 0e4e570c
...@@ -481,8 +481,10 @@ weston_desktop_xdg_surface_protocol_ack_configure(struct wl_client *wl_client, ...@@ -481,8 +481,10 @@ weston_desktop_xdg_surface_protocol_ack_configure(struct wl_client *wl_client,
} else if (configure->serial == serial) { } else if (configure->serial == serial) {
wl_list_remove(&configure->link); wl_list_remove(&configure->link);
found = true; found = true;
break;
} else {
break;
} }
break;
} }
if (!found) { if (!found) {
struct weston_desktop_client *client = struct weston_desktop_client *client =
......
...@@ -1106,8 +1106,10 @@ weston_desktop_xdg_surface_protocol_ack_configure(struct wl_client *wl_client, ...@@ -1106,8 +1106,10 @@ weston_desktop_xdg_surface_protocol_ack_configure(struct wl_client *wl_client,
} else if (configure->serial == serial) { } else if (configure->serial == serial) {
wl_list_remove(&configure->link); wl_list_remove(&configure->link);
found = true; found = true;
break;
} else {
break;
} }
break;
} }
if (!found) { if (!found) {
struct weston_desktop_client *client = struct weston_desktop_client *client =
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment