Make set_device_event_filter non-mut
Commit f10a984 added `EventLoopWindowTarget::set_device_event_filter`
with for a mutable reference, however most winit APIs work with
immutable references, so altering API to play nicely with existing APIs.
This also disables device event filtering on debug example.
This commit is contained in:
parent
10419ff441
commit
eec84ade86
4 changed files with 12 additions and 10 deletions
|
|
@ -788,12 +788,12 @@ impl<T> EventLoopWindowTarget<T> {
|
|||
}
|
||||
|
||||
#[inline]
|
||||
pub fn set_device_event_filter(&mut self, _filter: DeviceEventFilter) {
|
||||
pub fn set_device_event_filter(&self, _filter: DeviceEventFilter) {
|
||||
match *self {
|
||||
#[cfg(feature = "wayland")]
|
||||
EventLoopWindowTarget::Wayland(_) => (),
|
||||
#[cfg(feature = "x11")]
|
||||
EventLoopWindowTarget::X(ref mut evlp) => evlp.set_device_event_filter(_filter),
|
||||
EventLoopWindowTarget::X(ref evlp) => evlp.set_device_event_filter(_filter),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue