mirror of
https://github.com/pinnacle-comp/pinnacle.git
synced 2024-12-27 21:58:18 +01:00
Send pointer frame on pointer events
This commit is contained in:
parent
d443d9e8a5
commit
93e139e746
2 changed files with 11 additions and 7 deletions
15
src/input.rs
15
src/input.rs
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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(
|
||||
|
|
Loading…
Reference in a new issue