mirror of
https://github.com/Smithay/smithay.git
synced 2024-09-29 17:38:46 +02:00
Use from() rather than into()
This commit is contained in:
parent
76ab50cde8
commit
21ffc6677d
2 changed files with 5 additions and 4 deletions
|
@ -137,7 +137,7 @@ impl<Backend> AnvilState<Backend> {
|
|||
let serial = SCOUNTER.next_serial();
|
||||
let button = evt.button_code();
|
||||
|
||||
let state: wl_pointer::ButtonState = evt.state().into();
|
||||
let state = wl_pointer::ButtonState::from(evt.state());
|
||||
|
||||
if wl_pointer::ButtonState::Pressed == state {
|
||||
self.update_keyboard_focus(dh, serial);
|
||||
|
@ -285,7 +285,8 @@ impl<Backend> AnvilState<Backend> {
|
|||
}
|
||||
|
||||
fn on_pointer_axis<B: InputBackend>(&mut self, dh: &DisplayHandle, evt: B::PointerAxisEvent) {
|
||||
let source: wl_pointer::AxisSource = evt.source().into();
|
||||
let source = wl_pointer::AxisSource::from(evt.source());
|
||||
|
||||
let horizontal_amount = evt
|
||||
.amount(input::Axis::Horizontal)
|
||||
.unwrap_or_else(|| evt.amount_discrete(input::Axis::Horizontal).unwrap() * 3.0);
|
||||
|
|
|
@ -68,7 +68,7 @@ impl Smallvil {
|
|||
|
||||
let button = event.button_code();
|
||||
|
||||
let button_state: wl_pointer::ButtonState = event.state().into();
|
||||
let button_state = wl_pointer::ButtonState::from(event.state());
|
||||
|
||||
if wl_pointer::ButtonState::Pressed == button_state && !pointer.is_grabbed() {
|
||||
if let Some(window) = self.space.window_under(self.pointer_location).cloned() {
|
||||
|
@ -97,7 +97,7 @@ impl Smallvil {
|
|||
);
|
||||
}
|
||||
InputEvent::PointerAxis { event, .. } => {
|
||||
let source: wl_pointer::AxisSource = event.source().into();
|
||||
let source = wl_pointer::AxisSource::from(event.source());
|
||||
|
||||
let horizontal_amount = event
|
||||
.amount(Axis::Horizontal)
|
||||
|
|
Loading…
Reference in a new issue