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

Unified Diff: content/browser/renderer_host/gtk_im_context_wrapper.cc

Issue 9151007: GTK: Seal up GSEALs, focusing on GtkSelectionData. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Add gtk_widget_style_attach to make minimal version 2.18 Created 8 years, 11 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/gtk/certificate_viewer.cc ('k') | content/browser/tab_contents/web_drag_dest_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/gtk_im_context_wrapper.cc
diff --git a/content/browser/renderer_host/gtk_im_context_wrapper.cc b/content/browser/renderer_host/gtk_im_context_wrapper.cc
index 728e37ed1f8ba8f3108746663a0d5d733bf9f817..414b9ac8d19055c496589051b822a38b66777638 100644
--- a/content/browser/renderer_host/gtk_im_context_wrapper.cc
+++ b/content/browser/renderer_host/gtk_im_context_wrapper.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -589,9 +589,10 @@ void GtkIMContextWrapper::HandleHostViewRealize(GtkWidget* widget) {
// We should only set im context's client window once, because when setting
// client window.im context may destroy and recreate its internal states and
// objects.
- if (widget->window) {
- gtk_im_context_set_client_window(context_, widget->window);
- gtk_im_context_set_client_window(context_simple_, widget->window);
+ GdkWindow* gdk_window = gtk_widget_get_window(widget);
+ if (gdk_window) {
+ gtk_im_context_set_client_window(context_, gdk_window);
+ gtk_im_context_set_client_window(context_simple_, gdk_window);
}
}
« no previous file with comments | « chrome/browser/ui/gtk/certificate_viewer.cc ('k') | content/browser/tab_contents/web_drag_dest_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698