mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2025-01-26 03:36:32 +11:00
x11: Always receive Awakened event in run_forever (#489)
* x11: Always receive Awakened event in run_forever Do not reset the pending_wakeup boolean at the start of run_forever so that each call to EventsLoopProxy::wakeup results in an Awakened event. Fixes #462 * Update CHANGELOG.md
This commit is contained in:
parent
fe2d37fcdc
commit
ea28791da6
2 changed files with 1 additions and 2 deletions
|
@ -7,6 +7,7 @@
|
||||||
- Implemented `Moved` event on macOS.
|
- Implemented `Moved` event on macOS.
|
||||||
- On Windows, implemented all variants of `DeviceEvent` other than `Text`. Mouse `DeviceEvent`s are now received even if the window isn't in the foreground.
|
- On Windows, implemented all variants of `DeviceEvent` other than `Text`. Mouse `DeviceEvent`s are now received even if the window isn't in the foreground.
|
||||||
- `DeviceId` on Windows is no longer a unit struct, and now contains a `u32`. For `WindowEvent`s, this will always be 0, but on `DeviceEvent`s it will be the handle to that device. `DeviceIdExt::get_persistent_identifier` can be used to acquire a unique identifier for that device that persists across replugs/reboots/etc.
|
- `DeviceId` on Windows is no longer a unit struct, and now contains a `u32`. For `WindowEvent`s, this will always be 0, but on `DeviceEvent`s it will be the handle to that device. `DeviceIdExt::get_persistent_identifier` can be used to acquire a unique identifier for that device that persists across replugs/reboots/etc.
|
||||||
|
- Corrected `run_forever` on X11 to stop discarding `Awakened` events.
|
||||||
|
|
||||||
# Version 0.13.1 (2018-04-26)
|
# Version 0.13.1 (2018-04-26)
|
||||||
|
|
||||||
|
|
|
@ -190,8 +190,6 @@ impl EventsLoop {
|
||||||
pub fn run_forever<F>(&mut self, mut callback: F)
|
pub fn run_forever<F>(&mut self, mut callback: F)
|
||||||
where F: FnMut(Event) -> ControlFlow
|
where F: FnMut(Event) -> ControlFlow
|
||||||
{
|
{
|
||||||
self.pending_wakeup.store(false, atomic::Ordering::Relaxed);
|
|
||||||
|
|
||||||
let mut xev = unsafe { mem::uninitialized() };
|
let mut xev = unsafe { mem::uninitialized() };
|
||||||
|
|
||||||
loop {
|
loop {
|
||||||
|
|
Loading…
Add table
Reference in a new issue