Feat/support multiple input methods rebased#4
Merged
rano-oss merged 9 commits intoJan 5, 2026
Merged
Conversation
- Add app_id field to input method instances, extracted from PID - Change API to use app_id strings instead of ObjectId/Handle - Restore input_method_handle to TextInputUserData (shared) - Store Optional<ObjectId> in text input instances for per-client assignment - Update set_active_instance() to take app_id parameter - Update set_input_method() to work on focused text input only - Update set_input_method_globally() to use app_id This provides a cleaner API where: - app_id is the stable identifier (e.g. 'fcitx5', 'ibus-daemon') - Compositors don't need to track ObjectIds - Only focused text input can be changed (unless global mode)
The InputMethodHandle is now stored inside TextInputHandle, removing
the need to pass it as a parameter to set_input_method() methods.
Before:
text_input_handle.set_input_method("fcitx5", &input_method_handle);
After:
text_input_handle.set_input_method("fcitx5");
This is cleaner since both handles come from the same seat's user data.
Reverts embedding InputMethodHandle in TextInputHandle. The handle is now passed as a parameter again for more flexibility. API: - InputMethodHandle::set_active_instance(app_id) - no parameter - TextInputHandle::set_input_method(app_id, &handle) - takes handle - TextInputHandle::set_input_method_globally(app_id, &handle) - takes handle
When a new text input instance is created, it now defaults to using the currently active input method (if any). This ensures new text inputs automatically use the global active input method in global mode.
…iple_input_methods-rebased
…multiple_input_methods-rebased
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.