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

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

Issue 1234223005: Initial gtk3 support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Silence gtk memory leak Created 5 years, 3 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/gtk2_border.cc ('k') | chrome/browser/ui/libgtk2ui/gtk2_status_icon.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/libgtk2ui/gtk2_key_bindings_handler.cc
diff --git a/chrome/browser/ui/libgtk2ui/gtk2_key_bindings_handler.cc b/chrome/browser/ui/libgtk2ui/gtk2_key_bindings_handler.cc
index eec9dde2d6dbdf5787e391e62508b9bfcb3d2c51..aad16ccddc24e22da85396a93a6cebf846ad26cb 100644
--- a/chrome/browser/ui/libgtk2ui/gtk2_key_bindings_handler.cc
+++ b/chrome/browser/ui/libgtk2ui/gtk2_key_bindings_handler.cc
@@ -61,7 +61,14 @@ bool Gtk2KeyBindingsHandler::MatchEvent(
edit_commands_.clear();
// If this key event matches a predefined key binding, corresponding signal
// will be emitted.
- gtk_bindings_activate_event(GTK_OBJECT(handler_.get()), &gdk_event);
+
+ gtk_bindings_activate_event(
+#if GDK_MAJOR_VERSION >= 3
+ G_OBJECT(handler_.get()),
+#else
+ GTK_OBJECT(handler_.get()),
+#endif
+ &gdk_event);
bool matched = !edit_commands_.empty();
if (edit_commands)
@@ -123,7 +130,7 @@ void Gtk2KeyBindingsHandler::BuildGdkEventKeyFromXEvent(
gdk_event->group = 0;
}
- gdk_event->keyval = GDK_VoidSymbol;
+ gdk_event->keyval = GDK_KEY_VoidSymbol;
gdk_keymap_translate_keyboard_state(
keymap,
gdk_event->hardware_keycode,
« no previous file with comments | « chrome/browser/ui/libgtk2ui/gtk2_border.cc ('k') | chrome/browser/ui/libgtk2ui/gtk2_status_icon.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698