parent
44590a416d
commit
10cb041a80
1 changed files with 5 additions and 3 deletions
|
|
@ -378,9 +378,11 @@ impl HandleEvent for Pointer {
|
||||||
surface_x,
|
surface_x,
|
||||||
surface_y,
|
surface_y,
|
||||||
} => 'enter: {
|
} => 'enter: {
|
||||||
let surface_key: ObjectKey = surface.data().copied().unwrap();
|
let Some(surface_data): Option<&SurfaceData> = surface
|
||||||
let Some(surface_data): Option<&SurfaceData> =
|
.data::<ObjectKey>()
|
||||||
state.objects.get(surface_key).map(|o| o.as_ref())
|
.copied()
|
||||||
|
.and_then(|key| state.objects.get(key))
|
||||||
|
.map(|o| o.as_ref())
|
||||||
else {
|
else {
|
||||||
warn!("could not enter surface: stale surface");
|
warn!("could not enter surface: stale surface");
|
||||||
break 'enter;
|
break 'enter;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue