-
Notifications
You must be signed in to change notification settings - Fork 183
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
more complete input method support #2053
Merged
Merged
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
8f53847
implement input method keyboard grab
lilydjwg e5699cb
support input method popups
lilydjwg eb4760a
input method: avoid disabling a just-enabled text input on focus change
lilydjwg 316955b
workaround focus change while preediting
lilydjwg 74443a5
input method: don't grab keyboard if no text input is focused
lilydjwg 371600a
input method: fix conflicts with compositor shortcut keys
lilydjwg e0fce8a
input method: address reviews
lilydjwg 880bb88
use at place_popup_at function to convert from relative coordinates t…
lilydjwg d60b7bb
input method: simplify key handling code
lilydjwg a09a560
fix style
lilydjwg 6ce370d
convert coordinates type
lilydjwg 1682ced
input method: use input_method->active instead of already_disabled_input
lilydjwg 302838f
move place_popup_at to view-impl
lilydjwg cda1913
input method: explain the focus change workaround in detail
lilydjwg 7940111
input method: use pid to identify the input method sent key events
lilydjwg c302c35
fix headers
lilydjwg 5f0ce1f
input method: better ways to identify IM sent keys
lilydjwg 8a9cf96
Revert "input method: use input_method->active instead of already_dis…
lilydjwg 91e8f06
input method: don't send deactivate command if the input is not the c…
lilydjwg bfaef7a
fix code style
lilydjwg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
input
has aninput->active
field which keeps track of whether the input was activated or not. Maybe we can use that instead of keeping track of this ourselves? Wlroots automatically updatesinput->active
so we wouldn't needalready_disabled_input
at all if I understand correctly.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.
input->current_enabled
is still true on destruction.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 am not not sure what
input->current_enabled
is, but I am pretty sure thatinput->active
in wlroots is doing exactly what you need here: it is set only when deactive() is called (which is also when you will setalready_disabled_input
). Not to mention that the current approach seems a bit hacky, what if there are multiple text inputs or something of the sort?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.
Oh you mean the input method struct, not the text input one... Yes, it works! I'll update the code.
There are full of hacks in the implementation of Linux input method unfortunately. It never gets better. We thank god when it works (compared to those doesn't work, e.g. Steam).