mirror of
https://github.com/brl/mutter.git
synced 2024-11-24 17:10:40 -05:00
wayland/pointer-constraints: Reject invalid lifetime
https://gitlab.gnome.org/GNOME/mutter/issues/425
This commit is contained in:
parent
deef9960a4
commit
7719e33e68
@ -862,6 +862,19 @@ init_pointer_constraint (struct wl_resource *resource,
|
||||
return;
|
||||
}
|
||||
|
||||
switch (lifetime)
|
||||
{
|
||||
case ZWP_POINTER_CONSTRAINTS_V1_LIFETIME_ONESHOT:
|
||||
case ZWP_POINTER_CONSTRAINTS_V1_LIFETIME_PERSISTENT:
|
||||
break;
|
||||
|
||||
default:
|
||||
wl_resource_post_error (resource,
|
||||
WL_DISPLAY_ERROR_INVALID_OBJECT,
|
||||
"Invalid constraint lifetime");
|
||||
return;
|
||||
}
|
||||
|
||||
constraint = meta_wayland_pointer_constraint_new (surface, seat,
|
||||
region,
|
||||
lifetime,
|
||||
|
Loading…
Reference in New Issue
Block a user