-
Notifications
You must be signed in to change notification settings - Fork 228
feat: support multiple input methods #1852
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
base: master
Are you sure you want to change the base?
feat: support multiple input methods #1852
Conversation
|
How is having multiple input method engines supposed to work? Only one input method can be handling input for a single seat/keyboard at a given moment, surely? |
|
I am working on a POC, and yes only one input method can handle input for a single seat/keyboard at a given moment. That is why there is an active input method field, anyway the thing is support for keyboard switching with global or per client would have to be added to the compositor so why not just get them all in one fell swoop. I will cook and post a video if I can make it work ;) |
- 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
Merge master
…multiple_input_methods-rebased
…ds-rebased Feat/support multiple input methods rebased
No description provided.