{
ERR("source dimensions must be non-negative (%fx%f)",
wl_fixed_to_double(src_width), wl_fixed_to_double(src_height));
+ wl_resource_post_error(resource,
+ WL_VIEWPORT_ERROR_BAD_VALUE,
+ "wl_surface@%d viewport source "
+ "w=%f < 0 or h=%f < 0",
+ wl_resource_get_id(ec->comp_data->surface),
+ wl_fixed_to_double(src_width),
+ wl_fixed_to_double(src_height));
return;
}
if (dst_width <= 0 || dst_height <= 0)
{
ERR("destination dimensions must be positive (%dx%d)", dst_width, dst_height);
+ wl_resource_post_error(resource,
+ WL_VIEWPORT_ERROR_BAD_VALUE,
+ "destination size must be positive (%dx%d)",
+ dst_width, dst_height);
return;
}
{
ERR("source size must be positive (%fx%f)",
wl_fixed_to_double(src_width), wl_fixed_to_double(src_height));
+ wl_resource_post_error(resource,
+ WL_VIEWPORT_ERROR_BAD_VALUE,
+ "wl_surface@%d viewport source "
+ "w=%f <= 0 or h=%f <= 0",
+ wl_resource_get_id(ec->comp_data->surface),
+ wl_fixed_to_double(src_width),
+ wl_fixed_to_double(src_height));
return;
}
if (dst_width <= 0 || dst_height <= 0)
{
ERR("destination size must be positive (%dx%d)", dst_width, dst_height);
+ wl_resource_post_error(resource,
+ WL_VIEWPORT_ERROR_BAD_VALUE,
+ "destination size must be positive (%dx%d)",
+ dst_width, dst_height);
return;
}