Index: mandoline/ui/aura/window_tree_host_mojo.cc |
diff --git a/mandoline/ui/aura/window_tree_host_mojo.cc b/mandoline/ui/aura/window_tree_host_mojo.cc |
index aea5cb253c92317420bfb9fd0d87adc5a80d3c95..d6c815c990b8ffdfaa6a3786392969fc4854cbce 100644 |
--- a/mandoline/ui/aura/window_tree_host_mojo.cc |
+++ b/mandoline/ui/aura/window_tree_host_mojo.cc |
@@ -5,6 +5,7 @@ |
#include "mandoline/ui/aura/window_tree_host_mojo.h" |
#include "components/view_manager/public/cpp/view_manager.h" |
+#include "mandoline/ui/aura/input_method_mandoline.h" |
#include "mandoline/ui/aura/surface_context_factory.h" |
#include "mojo/application/public/interfaces/shell.mojom.h" |
#include "mojo/converters/geometry/geometry_type_converters.h" |
@@ -33,6 +34,15 @@ WindowTreeHostMojo::WindowTreeHostMojo(mojo::Shell* shell, mojo::View* view) |
CreateCompositor(GetAcceleratedWidget()); |
aura::Env::GetInstance()->set_context_factory(default_context_factory); |
DCHECK_EQ(context_factory_.get(), compositor()->context_factory()); |
+ |
+#if defined(OS_LINUX) && !defined(OS_ANDROID) |
+ // We override the input method on Linux. InputMethodAuraLinux was designed |
+ // to work on a stream of raw X11 events. However, we're now standardizing on |
+ // the Windows event model here. Trying to use InputMethodAuraLinux on a |
+ // Windows-like event stream leads to double character events. |
+ input_method_.reset(new InputMethodMandoline(this)); |
+ SetSharedInputMethod(input_method_.get()); |
Shu Chen
2015/07/17 01:54:08
Please notice that my refactoring cl https://coder
|
+#endif |
} |
WindowTreeHostMojo::~WindowTreeHostMojo() { |