color_representation_v1: fix swapped parameter for wp_color_representation_surface_v1_chroma_location_is_valid

This commit is contained in:
Simon Zeni 2026-03-09 11:06:51 -04:00
parent cf67632c75
commit e9e4896a21

View file

@ -180,8 +180,7 @@ static void color_repr_handle_set_chroma_location(struct wl_client *client,
}
uint32_t version = wl_resource_get_version(resource);
if (!wp_color_representation_surface_v1_chroma_location_is_valid(
version, chroma_location)) {
if (!wp_color_representation_surface_v1_chroma_location_is_valid(chroma_location, version)) {
wl_resource_post_error(resource, WP_COLOR_REPRESENTATION_SURFACE_V1_ERROR_CHROMA_LOCATION,
"Chroma location is not a valid enum value");
return;