mirror of
https://github.com/rust-windowing/winit.git
synced 2026-08-30 05:10:03 -04:00
Fix warnings on all platforms (#1383)
* Fix warnings on all platforms * Also fixed a trait impl bound that I noticed along the way
This commit is contained in:
@@ -936,6 +936,7 @@ unsafe extern "system" fn public_window_callback<T: 'static>(
|
||||
commctrl::DefSubclassProc(window, msg, wparam, lparam)
|
||||
} else {
|
||||
if let Some((scancode, vkey)) = process_key_params(wparam, lparam) {
|
||||
#[allow(deprecated)]
|
||||
subclass_input.send_event(Event::WindowEvent {
|
||||
window_id: RootWindowId(WindowId(window)),
|
||||
event: WindowEvent::KeyboardInput {
|
||||
@@ -965,6 +966,7 @@ unsafe extern "system" fn public_window_callback<T: 'static>(
|
||||
winuser::WM_KEYUP | winuser::WM_SYSKEYUP => {
|
||||
use crate::event::ElementState::Released;
|
||||
if let Some((scancode, vkey)) = process_key_params(wparam, lparam) {
|
||||
#[allow(deprecated)]
|
||||
subclass_input.send_event(Event::WindowEvent {
|
||||
window_id: RootWindowId(WindowId(window)),
|
||||
event: WindowEvent::KeyboardInput {
|
||||
@@ -1330,6 +1332,7 @@ unsafe extern "system" fn public_window_callback<T: 'static>(
|
||||
winuser::MapVirtualKeyA(windows_keycode as _, winuser::MAPVK_VK_TO_VSC);
|
||||
let virtual_keycode = event::vkey_to_winit_vkey(windows_keycode);
|
||||
|
||||
#[allow(deprecated)]
|
||||
subclass_input.send_event(Event::WindowEvent {
|
||||
window_id: RootWindowId(WindowId(window)),
|
||||
event: WindowEvent::KeyboardInput {
|
||||
@@ -1360,6 +1363,7 @@ unsafe extern "system" fn public_window_callback<T: 'static>(
|
||||
winuser::MapVirtualKeyA(windows_keycode as _, winuser::MAPVK_VK_TO_VSC);
|
||||
let virtual_keycode = event::vkey_to_winit_vkey(windows_keycode);
|
||||
|
||||
#[allow(deprecated)]
|
||||
subclass_input.send_event(Event::WindowEvent {
|
||||
window_id: RootWindowId(WindowId(window)),
|
||||
event: WindowEvent::KeyboardInput {
|
||||
@@ -1913,6 +1917,7 @@ unsafe extern "system" fn thread_event_target_callback<T: 'static>(
|
||||
});
|
||||
}
|
||||
|
||||
#[allow(deprecated)]
|
||||
subclass_input.send_event(Event::DeviceEvent {
|
||||
device_id,
|
||||
event: Key(KeyboardInput {
|
||||
|
||||
Reference in New Issue
Block a user