Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(618)

Unified Diff: ui/base/ime/input_method_auralinux.cc

Issue 224723008: [linux/aura] Supports IBus in async mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed review comments. Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/base/ime/input_method_auralinux.h ('k') | ui/base/ime/input_method_initializer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/ime/input_method_auralinux.cc
diff --git a/ui/base/ime/input_method_auralinux.cc b/ui/base/ime/input_method_auralinux.cc
index c31576d5efcbe6559427fbf91c44e632e6819093..a7a63686d1beacb9b3bfc5f0e19184db23a9611e 100644
--- a/ui/base/ime/input_method_auralinux.cc
+++ b/ui/base/ime/input_method_auralinux.cc
@@ -18,36 +18,6 @@ InputMethodAuraLinux::InputMethodAuraLinux(
InputMethodAuraLinux::~InputMethodAuraLinux() {}
-// static
-void InputMethodAuraLinux::Initialize() {
-#if (USE_X11)
- // Force a IBus IM context to run in synchronous mode.
- //
- // Background: IBus IM context runs by default in asynchronous mode. In
- // this mode, gtk_im_context_filter_keypress() consumes all the key events
- // and returns true while asynchronously sending the event to an underlying
- // IME implementation. When the event has not actually been consumed by
- // the underlying IME implementation, the context pushes the event back to
- // the GDK event queue marking the event as already handled by the IBus IM
- // context.
- //
- // The problem here is that those pushed-back GDK events are never handled
- // when base::MessagePumpX11 is used, which only handles X events. So, we
- // make a IBus IM context run in synchronous mode by setting an environment
- // variable. This is only the interface to change the mode.
- //
- // Another possible solution is to use GDK event loop instead of X event
- // loop.
- //
- // Since there is no reentrant version of setenv(3C), it's a caller's duty
- // to avoid race conditions. This function should be called in the main
- // thread on a very early stage, and supposed to be called from
- // ui::InitializeInputMethod().
- scoped_ptr<base::Environment> env(base::Environment::Create());
- env->SetVar("IBUS_ENABLE_SYNC_MODE", "1");
-#endif
-}
-
// Overriden from InputMethod.
void InputMethodAuraLinux::Init(bool focused) {
« no previous file with comments | « ui/base/ime/input_method_auralinux.h ('k') | ui/base/ime/input_method_initializer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698