fix(wayland): cursor material queue higher

This commit is contained in:
Nova
2022-11-14 11:53:08 -05:00
parent 57da02dbad
commit fd9957b784
4 changed files with 70 additions and 3 deletions

View File

@@ -239,7 +239,13 @@ impl Dispatch<WlPointer, SeatData, WaylandState> for SeatDelegate {
}
*seat_data.cursor.lock() = surface.and_then(|surf| {
compositor::with_states(&surf, |data| {
data.data_map.get::<Arc<Mutex<Cursor>>>().cloned()
let cursor = data.data_map.get::<Arc<Mutex<Cursor>>>();
if let Some(cursor) = cursor {
if let Some(core_surface) = cursor.lock().core_surface.upgrade() {
core_surface.set_material_offset(1);
}
}
cursor.cloned()
})
});
}