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

Unified Diff: mandoline/ui/aura/window_tree_host_mojo.cc

Issue 1234623004: mandoline: Fix character entry in html_viewer on Linux. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove stray mark. Created 5 years, 5 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
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() {
« components/view_manager/display_manager.cc ('K') | « mandoline/ui/aura/window_tree_host_mojo.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698