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

WASM: Create canvas before first window in resumed(). Fixes #2618 #2620

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

boondocklabs
Copy link
Contributor

This creates a canvas and inserts into the document body, and attaches it to the initial window in Runner::resumed(). This fixes an issue where events were being routed to a WindowId that was not inserted into the window manager as reported in #2618.

With this change, duplicate winit messages to the rogue WindowId are no longer observed, and ModifiersChanged events are associated with the correct WindowId.

Copy link

@Mirauzo Mirauzo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • # > # - [ ] _

@@ -286,6 +286,77 @@ where
F: Future<Output = ()>,
C: Compositor + 'static,
{
#[cfg(target_arch = "wasm32")]
fn resumed(&mut self, event_loop: &winit::event_loop::ActiveEventLoop) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

**

Suggested change
fn resumed(&mut self, event_loop: &winit::event_loop::ActiveEventLoop) {
fn resumed(&mut self, event_loop: &winit::event_loop::ActiveEventLoop) {

**

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants