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

Unified Diff: chrome/browser/ui/libgtk2ui/x11_input_method_context_impl_gtk2.cc

Issue 243143002: linux-aura: Supports Compose key with XIM. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Disabled EF_IME_FABRICATED_KEY flag on CrOS. 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 | « chrome/browser/ui/libgtk2ui/x11_input_method_context_impl_gtk2.h ('k') | ui/aura/window_targeter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/libgtk2ui/x11_input_method_context_impl_gtk2.cc
diff --git a/chrome/browser/ui/libgtk2ui/x11_input_method_context_impl_gtk2.cc b/chrome/browser/ui/libgtk2ui/x11_input_method_context_impl_gtk2.cc
index 948314e12901a4448f5766982ae958418b0333f0..dcf1116b410e426b2428aae85c8a37fbcab7e17d 100644
--- a/chrome/browser/ui/libgtk2ui/x11_input_method_context_impl_gtk2.cc
+++ b/chrome/browser/ui/libgtk2ui/x11_input_method_context_impl_gtk2.cc
@@ -100,7 +100,8 @@ X11InputMethodContextImplGtk2::X11InputMethodContextImplGtk2(
: delegate_(delegate),
gtk_context_simple_(NULL),
gtk_multicontext_(NULL),
- gtk_context_(NULL) {
+ gtk_context_(NULL),
+ gdk_last_set_client_window_(NULL) {
CHECK(delegate_);
{
@@ -165,7 +166,10 @@ bool X11InputMethodContextImplGtk2::DispatchKeyEvent(
}
// Set the client window and cursor location.
- gtk_im_context_set_client_window(gtk_context_, event->key.window);
+ if (event->key.window != gdk_last_set_client_window_) {
+ gtk_im_context_set_client_window(gtk_context_, event->key.window);
+ gdk_last_set_client_window_ = event->key.window;
+ }
// Convert the last known caret bounds relative to the screen coordinates
// to a GdkRectangle relative to the client window.
gint x = 0;
@@ -195,6 +199,7 @@ void X11InputMethodContextImplGtk2::Reset() {
gtk_im_context_reset(gtk_multicontext_);
gtk_im_context_focus_out(gtk_context_simple_);
gtk_im_context_focus_out(gtk_multicontext_);
+ gdk_last_set_client_window_ = NULL;
}
void X11InputMethodContextImplGtk2::OnTextInputTypeChanged(
« no previous file with comments | « chrome/browser/ui/libgtk2ui/x11_input_method_context_impl_gtk2.h ('k') | ui/aura/window_targeter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698