-
Notifications
You must be signed in to change notification settings - Fork 892
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
Allow some events to perform cancellation. #3349
Comments
I don't know if this is possible in other backends, but it's not possible in Web. |
I think maybe (Using that is problematic though, because it works with the outer size of the window, not the inner size). (And |
I don't know about the web platform. What I am currently working with is the window platform. For example, WindowEvent::Resized I mentioned above. EventLoop only provides a notification callback. The reason why the window actually changes is not other than after winit executes the EventLoop callback. Changes to the window are made from winit's code. So the current phenomenon is that no matter what is done in the callback, it is the same as not doing anything. The code in the callback only has the right to know the callback message and has no decision-making power (for example, let winit ignore the message and give up adjusting the window) . |
It would be good to figure out an API for that first indeed. |
For example, in the WindowEvent::Resized method, if the calculation result does not meet my requirements or settings. I can cancel the execution of this event by returning false or other methods.
The text was updated successfully, but these errors were encountered: