fix(wayland): set seat cursor

This commit is contained in:
Nova
2023-01-01 14:34:18 -05:00
parent bdd5cbe8b0
commit 6b7a074fea

View File

@@ -227,17 +227,10 @@ impl Dispatch<WlPointer, SeatData, WaylandState> for WaylandState {
} }
}) })
} }
*seat_data
.panel_item
.get()
.unwrap()
.upgrade()
.unwrap()
.cursor
.lock() = surface.as_ref().map(|surf| surf.downgrade());
if let Some(panel_item) = seat_data.panel_item.get().and_then(|i| i.upgrade()) { if let Some(panel_item) = seat_data.panel_item.get().and_then(|i| i.upgrade()) {
panel_item.set_cursor(surface.as_ref(), hotspot_x, hotspot_y); panel_item.set_cursor(surface.as_ref(), hotspot_x, hotspot_y);
*panel_item.cursor.lock() = surface.as_ref().map(|surf| surf.downgrade());
} }
} }
wl_pointer::Request::Release => (), wl_pointer::Request::Release => (),