Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Winit should indicate that the IME got enabled and you should schedule an update from it, always updating doesn't make any sense and the input into terminal should correctly reposition, since you'll likely have preedit going.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried a little bit, the
Ime::Enabled
is only generated when the user starts typing, so we have no idea when the user switched the IME. On macOS, when the user is changing the IME (or just toggle caps lock, see the picture below), the text accessory view will appear on the last position you set.So with the current implementation, the user will never get a correct text accessory view position when they are enabling caps lock on macOS.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens when you press
CapsLock
, do we have any keyboard events in general for it? Maybe something in--print-events
appears with KeyEvent?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kchibisov the only lines logged when I toggle caps-lock or switch input languages on macOS is
[INFO ] [alacritty_winit_event] About to wait
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean, it's maybe not delivered from the winit itself. Generally I'm not that much against updating the IME more frequently just on macOS, but I'd like to know a better entry point for such stuff in general.