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

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

Issue 813823003: Allow build under GTK+ 2.24. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update expected_deps since the glib version dep decreased. Created 6 years 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/print_dialog_gtk2.cc ('k') | chrome/installer/linux/debian/expected_deps_ia32 » ('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 d6e18f6427109a9e209b23bea398ab6bfe6dab3a..b4549925acce79fe9efb8f28f1f75957faf0292f 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
@@ -236,11 +236,19 @@ GdkEvent* X11InputMethodContextImplGtk2::GdkEventFromNativeEvent(
g_free(keyvals);
keyvals = NULL;
// Get a GdkWindow.
+#if GTK_CHECK_VERSION(2,24,0)
GdkWindow* window = gdk_x11_window_lookup_for_display(display, xkey.window);
+#else
+ GdkWindow* window = gdk_window_lookup_for_display(display, xkey.window);
+#endif
if (window)
g_object_ref(window);
else
+#if GTK_CHECK_VERSION(2,24,0)
window = gdk_x11_window_foreign_new_for_display(display, xkey.window);
+#else
+ window = gdk_window_foreign_new_for_display(display, xkey.window);
+#endif
if (!window) {
LOG(ERROR) << "Cannot get a GdkWindow for a key event.";
return NULL;
@@ -348,7 +356,11 @@ void X11InputMethodContextImplGtk2::OnPreeditStart(GtkIMContext* context) {
X11InputMethodContextImplGtk2::GtkCommitSignalTrap::GtkCommitSignalTrap()
: is_trap_enabled_(false),
+#if GTK_CHECK_VERSION (2,22,0)
gdk_event_key_keyval_(GDK_KEY_VoidSymbol),
+#else
+ gdk_event_key_keyval_(GDK_VoidSymbol),
+#endif
is_signal_caught_(false) {}
void X11InputMethodContextImplGtk2::GtkCommitSignalTrap::StartTrap(
« no previous file with comments | « chrome/browser/ui/libgtk2ui/print_dialog_gtk2.cc ('k') | chrome/installer/linux/debian/expected_deps_ia32 » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698