diff --git a/src/backend/render/cursor.rs b/src/backend/render/cursor.rs index 4ae26b9c..a27fdf57 100644 --- a/src/backend/render/cursor.rs +++ b/src/backend/render/cursor.rs @@ -159,6 +159,7 @@ pub fn draw_dnd_icon( } pub struct PointerElement { + seat_id: usize, texture: T, position: Point, size: Size, @@ -167,12 +168,14 @@ pub struct PointerElement { impl PointerElement { pub fn new( + seat: &Seat, texture: T, relative_pointer_pos: Point, new_frame: bool, ) -> PointerElement { let size = texture.size().to_logical(1, Transform::Normal); PointerElement { + seat_id: seat.id(), texture, position: relative_pointer_pos, size, @@ -187,7 +190,7 @@ where ::TextureId: 'static, { fn id(&self) -> usize { - 0 + self.seat_id } fn location(&self, scale: impl Into>) -> Point { @@ -336,7 +339,7 @@ where Point::::from((frame.xhot as i32, frame.yhot as i32)).to_f64(); *state.current_image.borrow_mut() = Some(frame); - Some(PointerElement::new(pointer_image.clone(), location - hotspot, new_frame).into()) + Some(PointerElement::new(seat, pointer_image.clone(), location - hotspot, new_frame).into()) } else { None }