mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-29 05:40:12 -04:00
cursor-shape-v1: use generated enum validator
This commit is contained in:
parent
fae4c5097d
commit
aaeffe9769
1 changed files with 2 additions and 1 deletions
|
|
@ -46,7 +46,8 @@ static void device_handle_set_shape(struct wl_client *client, struct wl_resource
|
|||
return;
|
||||
}
|
||||
|
||||
if (shape == 0 || shape > WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_ZOOM_OUT) {
|
||||
uint32_t version = wl_resource_get_version(device_resource);
|
||||
if (!wp_cursor_shape_device_v1_shape_is_valid(shape, version)) {
|
||||
wl_resource_post_error(device_resource, WP_CURSOR_SHAPE_DEVICE_V1_ERROR_INVALID_SHAPE,
|
||||
"Invalid shape %"PRIu32, shape);
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue