libweston-desktop/xdg-shell: Properly properly handle ack_configure
commit 749637a8a306588964885fe6b25fda6087a84ccd 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: Derek Foreman <derekf@osg.samsung.com> Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
This commit is contained in:
parent
0e4e570cae
commit
e3715527b9
@ -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 =
|
||||
|
@ -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 =
|
||||
|
Loading…
x
Reference in New Issue
Block a user