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

ModifiersChanged not working on WASM #2618

Open
4 tasks done
boondocklabs opened this issue Sep 30, 2024 · 1 comment
Open
4 tasks done

ModifiersChanged not working on WASM #2618

boondocklabs opened this issue Sep 30, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@boondocklabs
Copy link
Contributor

Is your issue REALLY a bug?

  • My issue is indeed a bug!
  • I am not crazy! I will not fill out this form just to ask a question or request a feature. Pinky promise.

Is there an existing issue for this?

  • I have searched the existing issues.

Is this issue related to iced?

  • My hardware is compatible and my graphics drivers are up-to-date.

What happened?

Using a text_editor on wasm, using a modifier + key just results in a regular keypress instead of a modified key. (Ctrl-C just types the letter c)

What is the expected behavior?

Modifiers are applied to keystrokes

Version

master

Operating System

macOS

Do you have any log output?

No response

@boondocklabs boondocklabs added the bug Something isn't working label Sep 30, 2024
@boondocklabs
Copy link
Contributor Author

I've debugged this down to winit only producing ModifiersChanged events onto WindowId 1 which is the window created for the compositor created during boot. which is not inserted into the window manager.

When events arrive for this WindowId, they are dropped . Other events seem to be duplicated between both WindowId's, but ModifiersChanged is not, so the window attached to the canvas doesn't receive the event.

I'm wondering if it would be best to have a single window created per canvas on wasm targets, both to squelch duplicate events (they're dropped, but still adding overhead), and to fix the missing event propagation.

boondocklabs added a commit to boondocklabs/iced that referenced this issue Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant