Open magreenblatt opened 8 years ago
Original comment by Kevin Kratzer (Bitbucket: illfang, GitHub: illfang).
I can confirm this problem. I have tested the following versions:
I'm using IBus 1.5.10 + Mozc 1.15.1857.102 on Linux version 4.2.0-34-generic (buildd@lgw01-54) (gcc version 5.2.1 2015/10/10 (Ubuntu 5.2.1-22ubuntu2) ) # 39-Ubuntu SMP Thu Mar 10 22:13:01 UTC 2016 (Xubuntu 15.10, xfce 4.12.1)
Original comment by Kevin Kratzer (Bitbucket: illfang, GitHub: illfang).
This feature is marked as a TODO in the source code. It is possible to implement your own IME handling by registering an IME factory during initialization in libcef/browser/browser_main.cc e.g.:
#!c++
void CefBrowserMainParts::PreEarlyInitialization() {
#if defined(USE_AURA) && defined(OS_LINUX)
- // TODO(linux): Consider using a real input method or
- // views::LinuxUI::SetInstance.
- ui::InitializeInputMethodForTesting();
+ ui::InitializeInputMethod();
+ LinuxInputMethodContextFactory::SetInstance(this);
#endif
}
Issue #2039 was marked as a duplicate of this issue.
Original comment by XKorolX (Bitbucket: Oleg Oleg).
Is it planned to fix this bug? Thanks.
Original comment by azraelrabbit (Bitbucket: azraelrabbit, GitHub: azraelrabbit).
Is it planned to fix this bug?
Issue #2292 was marked as a duplicate of this issue.
Pull requests to fix this bug would be welcome.
Original comment by Abhijit Apte (Bitbucket: abhijitapte, GitHub: abhijitapte).
I have come up with this fix and tested it out on Linux. https://bitbucket.org/abhijitapte/cef_3163/commits/334af31b8ace200930505712e27b12e2efb280c3
Original comment by Abhijit Apte (Bitbucket: abhijitapte, GitHub: abhijitapte).
Raised PR 127 @magreenblatt please review the fix.
@abhijitapte Thanks for the PR. See comments there.
Original comment by Abhijit Apte (Bitbucket: abhijitapte, GitHub: abhijitapte).
@magreenblatt addressed most review comments. there's some more wiring that needs to be done between ClientImeHandlerGtk
and RealInputMethodContext
. please see my commit https://bitbucket.org/abhijitapte/cef/commits/778a1af9e3056e76d4ac89f77b52b29d3809c37b
Original comment by Abhijit Apte (Bitbucket: abhijitapte, GitHub: abhijitapte).
At this stage, the gtk input method context is active.
The preedit start, changed, commit, end callbacks are successfully invoked.
these need to be relayed back to the delegate RealInputMethodContext
and from thereon to LinuxInputMethodAuraLinux
.
Original comment by Abhijit Apte (Bitbucket: abhijitapte, GitHub: abhijitapte).
Gist of changes - @magreenblatt
Comparing the newly introduced classes to whatever is available in Chromium, here is the one to one mapping.
CEF's RealInputMethodContextFactory
corresponds to Chromium's libgtkui::GtkUi
(derives from LinuxUI
which derives from ui::LinuxInputMethodContextFactory
)
CEF's RealInputMethodContext
corresponds to Chromium's libgtkui::X11InputMethodContextImplGtk2
In order to externalize the GTK implementation contained in the equivalent of libgtkui::X11InputMethodContextImplGtk2
i.e., RealInputMethodContext , I have created a CefImeHandler
and the implementation of it is in cefclient ClientImeHandlerGtk
.
This is where GtkImContext
gets created and the callbacks are registered. The IME callbacks originating via GtkImContext
are supposed to relay the information back to the RealInputMethodContext
which in turn has a reference to ui::LinuxInputMethodContextDelegate
delegate in our case this happens to be ui::InputMethodAuraLinux
.
The left over part yet to be implemented is the delegation from callbacks, please refer to ime_handler_gtk.cc
@abhijitapte Please submit your changes as a PR against current master.
Original comment by earth ripple (Bitbucket: earth ripple).
I do n’t quite understand why this problem is still reproducible on ubuntu. I tried the latest version cef_binary_81.2.24 + gc0b313d + chromium-81.0.4044.113_linux64.tar.bz2. I tried to modify the code above and found the code. There are certain differences.
Original comment by han moneybags (Bitbucket: hanmoneybags, GitHub: hanmoneybags).
@{5a02b5e49ec0fc1b0de9ee52} @{557058:2f2a2aee-b500-4023-9734-037e9897c3ab} I modified the code according to the above method, but an error will occur, the error message is as follows:
How can i solve this problem? And I am using 3683 branch.
Thanks.
Issue #3086 was marked as a duplicate of this issue.
Issue #3120 was marked as a duplicate of this issue.
Also possibly related to issue #2892
Original comment by Guofeng Zhang (Bitbucket: Guofeng Zhang).
I tried the latest version cef_binary_95.7.14+g9f72f35+chromium-95.0.4638.69_linux64,this problem is still reproducible on ubuntu.
Someone is welcome to fix this issue and submit a pull request for consideration.
Original report by Xinkai Chen (Bitbucket: xinkai, GitHub: xinkai).
Both cefclient and cefsimple do not play well with IMEs on Linux. I have tried with ibus and fcitx, both failed.
With cefclient(GTK2), the address bar's cursor does not blink even though it responses to typing, and both IMEs cannot be activated in address bar, the web view, nor the dev tool window. With cefsimple(X11 native?), both IMEs cannot be activated in the web view.
If I modifiy the code, to use off-screen-rendering in cefclient however, the native GTK address bar becomes normal, but the web view still does not response to IME hotkeys.
In the cases where IMEs do not work at all, I noticed that in /proc/pid/maps, the corresponding libraries are not loaded at all.
What pazzles me is that, both Brackets and LightTable which in turn utilize CEF technology, function as one would hope.
The tests above are done in Archlinux x64 and Ubuntu 14.04 x64.
Any help is appreciated! Thanks in advance.