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

On Web, enable event propagation #3062

Merged
merged 1 commit into from
Aug 28, 2023

Conversation

daxpedda
Copy link
Member

This PR removes the code originally stopping events from being propagated from the canvas. The code inserting DeviceEvents before WindowEvents was also removed, de-duplicating a bunch of code.

The motivation here is the following:

  • Reduce the side effects Winit has on the overall webpage that might or might not be desirable. Similar to Implement ResizeObserver #2859.
  • Activating fullscreen requires a transient activation, which until now we detected by hijacking some already used events on the canvas. This isn't ideal because transient activation can happen anywhere on the page. Now that we have enabled event propagation, we can register events on the window to detect those activations.
  • Remove more unnecessary code!

@daxpedda daxpedda merged commit 1dfca5a into rust-windowing:master Aug 28, 2023
50 checks passed
kchibisov pushed a commit to kchibisov/winit that referenced this pull request Oct 17, 2023
kchibisov pushed a commit that referenced this pull request Oct 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

1 participant