ozone/x11: Support IME through gtkui
This CL adds initial IME support to ozone/x11 by reusing libgtkui's LinuxInputMethodContext{Factory} implementation, which uses gtk-immodule as backend. Some logic has been added to be able to support the following scenarios, possible, from now on, in ozone linux platforms: (1) LinuxInputMethodContextFactory is implemented inside ozone backend implementation, it is instantiated set in OzonePlatform::InitializeUI. E.g: ozone/wayland. (2) If the ozone platform initialization have not created/set a LinuxInputMethodContextFactory instance and GtkUi is in place, then it is set as the global instance. E.g: ozone/x11. Even though the logic to support the aforementioned use cases is quite tricky, spread over different layers (e.g: views::LinuxUI, libgtkui::GtkUi, ui::OzonePlatform), using ifdefs, etc; it should be cleaned up and unified once X11 migration to Ozone is completed. It is worth noting that proper IME support for now requires GLib message pump (at least IBus, for example) being used in UI thread (i.e: use_glib=true). Bug: 987939, 789065 Change-Id: I700d39eec02c6bbeaafca29c9405e8e0e1ff6ade Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1798263 Commit-Queue: Nick Yamane <nickdiego@igalia.com> Reviewed-by:Sadrul Chowdhury <sadrul@chromium.org> Reviewed-by:
Thomas Anderson <thomasanderson@chromium.org> Cr-Commit-Position: refs/heads/master@{#698627}
Showing
Please register or sign in to comment