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:
parent
de5327477a
commit
8bb004a1d9
9 changed files with 43 additions and 51 deletions
|
|
@ -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),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue