Silence warnings about use of deprecated fields

This commit is contained in:
Murarth 2020-01-04 10:58:39 -07:00 committed by Osspial
parent d29f7f34aa
commit ac69a9c0dc
3 changed files with 9 additions and 0 deletions

View file

@ -341,6 +341,7 @@ impl<'a> WindowEvent<'a> {
input,
is_synthetic,
}),
#[allow(deprecated)]
CursorMoved {
device_id,
position,
@ -352,6 +353,7 @@ impl<'a> WindowEvent<'a> {
}),
CursorEntered { device_id } => Some(CursorEntered { device_id }),
CursorLeft { device_id } => Some(CursorLeft { device_id }),
#[allow(deprecated)]
MouseWheel {
device_id,
delta,
@ -363,6 +365,7 @@ impl<'a> WindowEvent<'a> {
phase,
modifiers,
}),
#[allow(deprecated)]
MouseInput {
device_id,
state,

View file

@ -54,6 +54,7 @@ pub fn init_keyboard(
};
let vkcode = key_to_vkey(rawkey, keysym);
my_sink.send_window_event(
#[allow(deprecated)]
WindowEvent::KeyboardInput {
device_id: crate::event::DeviceId(
crate::platform_impl::DeviceId::Wayland(DeviceId),
@ -96,6 +97,7 @@ pub fn init_keyboard(
let state = ElementState::Pressed;
let vkcode = key_to_vkey(repeat_event.rawkey, repeat_event.keysym);
repeat_sink.send_window_event(
#[allow(deprecated)]
WindowEvent::KeyboardInput {
device_id: crate::event::DeviceId(crate::platform_impl::DeviceId::Wayland(
DeviceId,
@ -155,6 +157,7 @@ pub fn init_keyboard(
_ => unreachable!(),
};
my_sink.send_window_event(
#[allow(deprecated)]
WindowEvent::KeyboardInput {
device_id: crate::event::DeviceId(
crate::platform_impl::DeviceId::Wayland(DeviceId),

View file

@ -561,6 +561,7 @@ impl<T: 'static> EventProcessor<T> {
let modifiers = self.device_mod_state.modifiers();
#[allow(deprecated)]
callback(Event::WindowEvent {
window_id,
event: WindowEvent::KeyboardInput {
@ -1051,6 +1052,7 @@ impl<T: 'static> EventProcessor<T> {
let virtual_keycode = events::keysym_to_element(keysym as c_uint);
let modifiers = self.device_mod_state.modifiers();
#[allow(deprecated)]
callback(Event::DeviceEvent {
device_id,
event: DeviceEvent::Key(KeyboardInput {
@ -1203,6 +1205,7 @@ impl<T: 'static> EventProcessor<T> {
let keysym = wt.xconn.keycode_to_keysym(keycode);
let virtual_keycode = events::keysym_to_element(keysym as c_uint);
#[allow(deprecated)]
callback(Event::WindowEvent {
window_id,
event: WindowEvent::KeyboardInput {