shell: fix client initiated tablet grabs
This commit is contained in:
parent
0e15b14ab2
commit
2a3b4dca5f
1 changed files with 10 additions and 2 deletions
|
|
@ -5190,8 +5190,16 @@ pub fn check_grab_preconditions(
|
||||||
if let Some(surface) = client_initiated {
|
if let Some(surface) = client_initiated {
|
||||||
// Check that this surface has a click or touch down grab.
|
// Check that this surface has a click or touch down grab.
|
||||||
if !match serial {
|
if !match serial {
|
||||||
Some(serial) => pointer.has_grab(serial) || touch.has_grab(serial),
|
Some(serial) => {
|
||||||
None => pointer.is_grabbed() | touch.is_grabbed(),
|
pointer.has_grab(serial)
|
||||||
|
|| touch.has_grab(serial)
|
||||||
|
|| tools.values().any(|tool| tool.has_grab(serial))
|
||||||
|
}
|
||||||
|
None => {
|
||||||
|
pointer.is_grabbed()
|
||||||
|
|| touch.is_grabbed()
|
||||||
|
|| tools.values().any(|tool| tool.is_grabbed())
|
||||||
|
}
|
||||||
} {
|
} {
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue