Add missing check for dead surfaces
Previously a pointer.leave event would be sent with a NULL target, causing the client to disconnect.
This commit is contained in:
parent
fdaf1859b0
commit
a9f1188fea
|
@ -96,6 +96,9 @@ impl PointerInternal {
|
|||
F: FnMut(&WlPointer, &WlSurface),
|
||||
{
|
||||
if let Some((ref focus, _)) = self.focus {
|
||||
if !focus.as_ref().is_alive() {
|
||||
return;
|
||||
}
|
||||
for ptr in &self.known_pointers {
|
||||
if ptr.as_ref().same_client_as(focus.as_ref()) {
|
||||
f(ptr, focus)
|
||||
|
|
Loading…
Reference in New Issue