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

WindowEvent { Focused } occurs after WindowEvent { MouseInput { Pressed } } on web backend #2112

Closed
rukai opened this issue Dec 27, 2021 · 1 comment · Fixed by #2202
Closed
Labels
B - bug Dang, that shouldn't have happened C - needs investigation Issue must be confirmed and researched DS - web

Comments

@rukai
Copy link
Contributor

rukai commented Dec 27, 2021

Heres a screenshot from running the web.rs example
image

The other backends return the window focus first and my application and https://github.com/rukai/winit_input_helper rely on this functionality.
The current handling in the web backend causes the first mouse click event to be lost.

@rukai
Copy link
Contributor Author

rukai commented Dec 27, 2021

Given that any click event should also result in a window focus event, I think the solution might be to generate an extra window focus event here like we already do for CursorMoved.

https://github.com/rust-windowing/winit/blob/7e0c6ee09757663efacd9d7ba7c70ff101ec4e35/src/platform_impl/web/event_loop/window_target.rs#L153+#L176

@maroider maroider added DS - web C - needs investigation Issue must be confirmed and researched B - bug Dang, that shouldn't have happened labels Dec 27, 2021
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 C - needs investigation Issue must be confirmed and researched DS - web
Development

Successfully merging a pull request may close this issue.

2 participants