mirror of
https://github.com/rust-windowing/winit.git
synced 2026-06-27 15:13:13 -04:00
Rename DeviceEventFilter to DeviceEvents
The use of `Filter` was confusing so it was removed inverting the behavior of the enum and methods using it. Co-authored-by: Kirill Chibisov <contact@kchibisov.com>
This commit is contained in:
@@ -30,9 +30,7 @@ use crate::{
|
||||
dpi::{PhysicalPosition, PhysicalSize, Position, Size},
|
||||
error::{ExternalError, NotSupportedError, OsError as RootOsError},
|
||||
event::{Event, KeyEvent},
|
||||
event_loop::{
|
||||
ControlFlow, DeviceEventFilter, EventLoopClosed, EventLoopWindowTarget as RootELW,
|
||||
},
|
||||
event_loop::{ControlFlow, DeviceEvents, EventLoopClosed, EventLoopWindowTarget as RootELW},
|
||||
icon::Icon,
|
||||
keyboard::{Key, KeyCode},
|
||||
platform::{modifier_supplement::KeyEventExtModifierSupplement, scancode::KeyCodeExtScancode},
|
||||
@@ -894,12 +892,12 @@ impl<T> EventLoopWindowTarget<T> {
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn set_device_event_filter(&self, _filter: DeviceEventFilter) {
|
||||
pub fn listen_device_events(&self, _allowed: DeviceEvents) {
|
||||
match *self {
|
||||
#[cfg(wayland_platform)]
|
||||
EventLoopWindowTarget::Wayland(_) => (),
|
||||
#[cfg(x11_platform)]
|
||||
EventLoopWindowTarget::X(ref evlp) => evlp.set_device_event_filter(_filter),
|
||||
EventLoopWindowTarget::X(ref evlp) => evlp.set_listen_device_events(_allowed),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user