api: remove ::dummy from Id types
`::dummy` was used for testing purposes and became redundant after adding e.g. `from_raw` and `into_raw` methods on `Id` types.
This commit is contained in:
parent
6e1b9fa24d
commit
32cd1ad9a7
35 changed files with 219 additions and 352 deletions
|
|
@ -30,7 +30,7 @@ use crate::dpi::{LogicalPosition, PhysicalPosition};
|
|||
use crate::event::{ElementState, MouseButton, MouseScrollDelta, TouchPhase, WindowEvent};
|
||||
|
||||
use crate::platform_impl::wayland::state::WinitState;
|
||||
use crate::platform_impl::wayland::{self, DeviceId, WindowId};
|
||||
use crate::platform_impl::wayland::{self, WindowId};
|
||||
|
||||
pub mod relative_pointer;
|
||||
|
||||
|
|
@ -59,8 +59,6 @@ impl PointerHandler for WinitState {
|
|||
},
|
||||
};
|
||||
|
||||
let device_id = crate::event::DeviceId(crate::platform_impl::DeviceId::Wayland(DeviceId));
|
||||
|
||||
for event in events {
|
||||
let surface = &event.surface;
|
||||
|
||||
|
|
@ -124,8 +122,10 @@ impl PointerHandler for WinitState {
|
|||
},
|
||||
// Regular events on the main surface.
|
||||
PointerEventKind::Enter { .. } => {
|
||||
self.events_sink
|
||||
.push_window_event(WindowEvent::CursorEntered { device_id }, window_id);
|
||||
self.events_sink.push_window_event(
|
||||
WindowEvent::CursorEntered { device_id: None },
|
||||
window_id,
|
||||
);
|
||||
|
||||
window.pointer_entered(Arc::downgrade(themed_pointer));
|
||||
|
||||
|
|
@ -133,7 +133,7 @@ impl PointerHandler for WinitState {
|
|||
pointer.winit_data().inner.lock().unwrap().surface = Some(window_id);
|
||||
|
||||
self.events_sink.push_window_event(
|
||||
WindowEvent::CursorMoved { device_id, position },
|
||||
WindowEvent::CursorMoved { device_id: None, position },
|
||||
window_id,
|
||||
);
|
||||
},
|
||||
|
|
@ -144,11 +144,11 @@ impl PointerHandler for WinitState {
|
|||
pointer.winit_data().inner.lock().unwrap().surface = None;
|
||||
|
||||
self.events_sink
|
||||
.push_window_event(WindowEvent::CursorLeft { device_id }, window_id);
|
||||
.push_window_event(WindowEvent::CursorLeft { device_id: None }, window_id);
|
||||
},
|
||||
PointerEventKind::Motion { .. } => {
|
||||
self.events_sink.push_window_event(
|
||||
WindowEvent::CursorMoved { device_id, position },
|
||||
WindowEvent::CursorMoved { device_id: None, position },
|
||||
window_id,
|
||||
);
|
||||
},
|
||||
|
|
@ -164,7 +164,7 @@ impl PointerHandler for WinitState {
|
|||
ElementState::Released
|
||||
};
|
||||
self.events_sink.push_window_event(
|
||||
WindowEvent::MouseInput { device_id, state, button },
|
||||
WindowEvent::MouseInput { device_id: None, state, button },
|
||||
window_id,
|
||||
);
|
||||
},
|
||||
|
|
@ -209,7 +209,7 @@ impl PointerHandler for WinitState {
|
|||
};
|
||||
|
||||
self.events_sink.push_window_event(
|
||||
WindowEvent::MouseWheel { device_id, delta, phase },
|
||||
WindowEvent::MouseWheel { device_id: None, delta, phase },
|
||||
window_id,
|
||||
)
|
||||
},
|
||||
|
|
|
|||
|
|
@ -66,10 +66,9 @@ impl Dispatch<ZwpRelativePointerV1, GlobalData, WinitState> for RelativePointerS
|
|||
},
|
||||
_ => return,
|
||||
};
|
||||
state.events_sink.push_device_event(
|
||||
DeviceEvent::MouseMotion { delta: (dx_unaccel, dy_unaccel) },
|
||||
super::DeviceId,
|
||||
);
|
||||
state
|
||||
.events_sink
|
||||
.push_device_event(DeviceEvent::MouseMotion { delta: (dx_unaccel, dy_unaccel) });
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue