anvil.shell: check that there's a grab before Move

If there's no click grab then the request is invalid.
This commit is contained in:
Ivan Molodetskikh 2020-02-02 18:07:43 +03:00
parent 03392bf7d1
commit d8495d81f2
No known key found for this signature in database
GPG Key ID: 02CE38DA47E9D691
1 changed files with 10 additions and 0 deletions

View File

@ -160,6 +160,11 @@ pub fn init_shell(
// TODO: touch move.
let pointer = seat.get_pointer().unwrap();
// Check that this surface has a click grab.
if !pointer.has_grab(serial) {
return;
}
let start_data = pointer.grab_start_data().unwrap();
let toplevel = SurfaceKind::Xdg(surface);
@ -210,6 +215,11 @@ pub fn init_shell(
// TODO: touch move.
let pointer = seat.get_pointer().unwrap();
// Check that this surface has a click grab.
if !pointer.has_grab(serial) {
return;
}
let start_data = pointer.grab_start_data().unwrap();
let toplevel = SurfaceKind::Wl(surface);