mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2024-11-23 23:52:22 +00:00
wlr_output_management_v1: use enum_is_valid functions
Signed-off-by: xurui <xurui@kylinos.cn>
This commit is contained in:
parent
81fa6c4b96
commit
38fc4f2976
@ -255,8 +255,7 @@ static void config_head_handle_set_transform(struct wl_client *client,
|
||||
return;
|
||||
}
|
||||
|
||||
if (transform < WL_OUTPUT_TRANSFORM_NORMAL ||
|
||||
transform > WL_OUTPUT_TRANSFORM_FLIPPED_270) {
|
||||
if (!wl_output_transform_is_valid(transform, 1)) {
|
||||
wl_resource_post_error(config_head_resource,
|
||||
ZWLR_OUTPUT_CONFIGURATION_HEAD_V1_ERROR_INVALID_TRANSFORM,
|
||||
"invalid transform");
|
||||
|
Loading…
Reference in New Issue
Block a user