You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add EventsLoop::wakeup independent of interrupt #175
The method EventsLoop::interrupt() is currently serving the dual purpose of
Stop processing events during run_forever and poll_events
Wakeup the event loop from other threads
Running the wakeup code when you only care about 1. simply wastes cycles.
I'm proposing that a second method, EventsLoop::wakeup() is added to allow performing these tasks independently. An alternative design would be removing the interrupted flag altogether and allow the closure passed to run_forever and poll_events to return a flag indicating their desire to continue or halt.
I've thought about this a bit more, and I think it would be appropriate for the wakeup method to take a winit::WindowId so that the Awakened event is associated with the correct window.
Digging into the source a bit, it looks like there's some leftover WindowProxy implementations. These aren't available in the public API anymore since the recent event handling refactor. Seems like they should be removed / be absorbed into EventsLoop::wakeup implementations.
Activity
jwilm commentedon May 10, 2017
Btw, I'd be happy to implement this. I thought discussion was an appropriate first step, though.
jwilm commentedon May 11, 2017
I've thought about this a bit more, and I think it would be appropriate for the
wakeupmethod to take awinit::WindowIdso that the Awakened event is associated with the correct window.jwilm commentedon May 11, 2017
Digging into the source a bit, it looks like there's some leftover
WindowProxyimplementations. These aren't available in the public API anymore since the recent event handling refactor. Seems like they should be removed / be absorbed intoEventsLoop::wakeupimplementations.jwilm commentedon May 19, 2017
Does anyone have feedback about this?
mitchmindtree commentedon May 22, 2017
@jwilm just thought I'd let you know that #136 and in particular this comment are related to (and probably supersede) this.
jwilm commentedon May 23, 2017
Agreed that the pending
Proxytype should supersede this.Merge pull request rust-windowing#175 from asajeffrey/get-magicleap-w…
fix(linux): incorrect monitor size, fixes: rust-windowing#175 (rust-w…