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:
parent
03392bf7d1
commit
d8495d81f2
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue