Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If events follow an AboutToWait, must a NewEvents precede those events? #3563

Open
rukai opened this issue Mar 4, 2024 · 1 comment
Open
Labels
B - bug Dang, that shouldn't have happened DS - windows

Comments

@rukai
Copy link
Contributor

rukai commented Mar 4, 2024

I have an issue reported to winit_input_helper: rukai/winit_input_helper#55
In this issue a user observes events occurring like:

event: NewEvents(Poll)
event: AboutToWait
event: WindowEvent { window_id: WindowId(WindowId(11996930)), event: CloseRequested }
event: WindowEvent { window_id: WindowId(WindowId(11996930)), event: Focused(true) }
event: NewEvents(Poll)
event: AboutToWait

My original reading of https://docs.rs/winit/latest/winit/event/enum.Event.html led me to believe that this was impossible and that a NewEvents must precede any new events after an AboutToWait. I can now see that whether or not this is the case is up for interpretation.

What I want from this issue is for this behavior to be documented either way:

@daxpedda daxpedda added the B - bug Dang, that shouldn't have happened label Mar 4, 2024
@daxpedda
Copy link
Member

daxpedda commented Mar 4, 2024

This looks like a bug to me.
rukai/winit_input_helper#55 doesn't seem to include any more information, so I will ask there.

EDIT: I didn't read carefully enough.

Clicking on "Close window" via the windows task bar is ignored in winit_input_helper.

I agree that the documentation could be improved on this front.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B - bug Dang, that shouldn't have happened DS - windows
Development

No branches or pull requests

2 participants