Repository navigation
Renamed DeviceEventFilter to DeviceEvents - #2700
Conversation
d3bbb96 to
ad3ec21
Compare
|
|
||
| #[inline] | ||
| pub fn set_device_event_filter(&self, _filter: DeviceEventFilter) { | ||
| pub fn listen_device_events(&self, _filter: DeviceEvents) { |
There was a problem hiding this comment.
I don't think in this file that makes sense as it doesn't conflict with other function names.
Happy to change it if a maintainer thinks otherwise.
|
rebased |
| impl<T: fmt::Debug> error::Error for EventLoopClosed<T> {} | ||
|
|
||
| /// Filter controlling the propagation of device events. | ||
| /// Controlling when device events are captured. |
There was a problem hiding this comment.
| /// Controlling when device events are captured. | |
| /// Control when device events are captured. |
| # Unreleased | ||
| - **Breaking** Renamed `EventLoopWindowTarget::set_device_event_filter` to `EventLoopWindowTarget::listen_device_events` and `DeviceEventFilter` to `DeviceEvents` and appropriately reversed its variants. | ||
| - On X11, fix `EventLoopWindowTarget::listen_device_events` effect being reversed. | ||
|
|
There was a problem hiding this comment.
| # Unreleased | |
| - **Breaking** Renamed `EventLoopWindowTarget::set_device_event_filter` to `EventLoopWindowTarget::listen_device_events` and `DeviceEventFilter` to `DeviceEvents` and appropriately reversed its variants. | |
| - On X11, fix `EventLoopWindowTarget::listen_device_events` effect being reversed. | |
| # Unreleased | |
| - **Breaking** Rename `DeviceEventFilter` to `DeviceEvents` reversing the behavior of variants. | |
| - **Breaking** Rename `EventLoopWindowTarget::set_device_event_filter` to `listen_device_events`. | |
| - On X11, fix `EventLoopWindowTarget::listen_device_events` effect being reversed. |
There was a problem hiding this comment.
Ensure that there's no empty line with the `Breaking below and there's one empty line to section heading.
There was a problem hiding this comment.
The line is too long, I've suggested the splitting in the suggested change but it's ignored.
| let filter_events = self.device_events.get() == DeviceEvents::Never | ||
| || (self.device_events.get() == DeviceEvents::WhenFocused && !focus); | ||
|
|
||
| let mut mask = 0; | ||
| if !filter_events { |
There was a problem hiding this comment.
Could you reverse all of that to Always and remove filter word all together?
There was a problem hiding this comment.
What do you mean revert all of that to Always?
There was a problem hiding this comment.
So we don't have to !filter_events? It would be let device_events = self.device_events.get() == DeviceEvents::Always || (focus && self.device.events.get() == DeviceEvents::WhenFocused) and then if device_events.
Remove all mentions of `filter` in documentation and function parameters. Brought documentation language more in line with the rest of the documentation.
CHANGELOG.mdif knowledge of this change could be valuable to usersRenamed
EventLoopWindowTarget::set_device_event_filtertoEventLoopWindowTarget::listen_device_eventsandDeviceEventFiltertoDeviceEventsand appropriately reversed its variants according to #2591 (comment).Could only test it on Linux.
Fixes #2591.