Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

dbr
Copy link
Contributor

@dbr dbr commented Feb 1, 2023

Previously, the ModCtrl/etc keys were not set reliably meaning the io().key_ctrl was never set, and possibly some other weird behaviour (like an abort if trying to call is_key_down(Key::ModCtrl))

There's some further compounding weirdness in that winit seems to only emit the ModifiersChanged after the window re-gains focus (on Linux/X11)

Regardless, I think this change avoids these problems, and is consistent with imgui-sdl2-support (and ocornut/imgui#5047 )

  • This needs backported to v0.10 as it's a bug in the last release
  • This will need applied to the viewports backend as it uses winit also (will merge that PR and rebase this one momentarily)

@dbr dbr added the bug label Feb 1, 2023
@dbr dbr mentioned this pull request Feb 2, 2023
dbr added 4 commits March 3, 2023 18:50
No longer needs to be handled outside of the main event match statement
Previously only the "LeftCtrl" was set, not ModCtrl (same for shift etc). Although winit also act weirdly, and once the window regains focus it starts starts triggering ModifierChanged which also sets ModCtrl, so this problem wasn't always noticeable
@dbr dbr merged commit 9ff2eab into imgui-rs:main Mar 3, 2023
@dbr dbr deleted the modfix branch March 4, 2023 00:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant