Send pointer frame on pointer events

This commit is contained in:
Ottatop 2023-10-12 19:15:47 -05:00
parent d443d9e8a5
commit 93e139e746
2 changed files with 11 additions and 7 deletions

View file

@ -500,6 +500,7 @@ impl State {
time: event.time_msec(),
},
);
pointer.frame(self);
}
fn pointer_axis<I: InputBackend>(&mut self, event: I::PointerAxisEvent) {
@ -545,10 +546,10 @@ impl State {
// self.seat.get_pointer().unwrap().current_focus()
// );
self.seat
.get_pointer()
.expect("Seat has no pointer")
.axis(self, frame);
let pointer = self.seat.get_pointer().expect("Seat has no pointer");
pointer.axis(self, frame);
pointer.frame(self);
}
/// Clamp pointer coordinates inside outputs
@ -626,6 +627,8 @@ impl State {
time: event.time_msec(),
},
);
pointer.frame(self);
}
fn pointer_motion<I: InputBackend>(&mut self, event: I::PointerMotionEvent) {
@ -673,7 +676,9 @@ impl State {
delta_unaccel: event.delta_unaccel(),
utime: event.time(),
},
)
);
ptr.frame(self);
}
}
}

View file

@ -65,7 +65,7 @@ where
) -> Vec<C> {
match &self.status {
CursorImageStatus::Hidden => vec![],
CursorImageStatus::Named(CursorIcon::Default) => {
CursorImageStatus::Named(_) => {
if let Some(texture) = self.texture.as_ref() {
vec![PointerRenderElement::<R>::from(
TextureRenderElement::from_texture_buffer(
@ -82,7 +82,6 @@ where
vec![]
}
}
CursorImageStatus::Named(_) => vec![],
CursorImageStatus::Surface(surface) => {
let elements: Vec<PointerRenderElement<R>> =
surface::render_elements_from_surface_tree(