diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2015-10-27 13:11:18 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2016-02-22 15:31:24 -0500 |
commit | aba063bfaa6d9f168dc7499e3dc5111bb420db13 (patch) | |
tree | 5fa0a0e842e759609b4ceef4fadc5887529dca4a /libs | |
parent | 157b4b6b72e4b55dfc7d0c83594794362938c789 (diff) |
remove Gtkmm2ext::possibly_translate_mod_to_make_legal_accelerator().
This is no longer needed because we can set the modifier to the actual bits that GTK uses for Command (META+MOD2)
Diffstat (limited to 'libs')
-rw-r--r-- | libs/gtkmm2ext/gtkmm2ext/utils.h | 1 | ||||
-rw-r--r-- | libs/gtkmm2ext/utils.cc | 24 |
2 files changed, 0 insertions, 25 deletions
diff --git a/libs/gtkmm2ext/gtkmm2ext/utils.h b/libs/gtkmm2ext/gtkmm2ext/utils.h index 43baf5980b..5e95a52229 100644 --- a/libs/gtkmm2ext/gtkmm2ext/utils.h +++ b/libs/gtkmm2ext/gtkmm2ext/utils.h @@ -123,7 +123,6 @@ namespace Gtkmm2ext { LIBGTKMM2EXT_API Glib::RefPtr<Gdk::Window> window_to_draw_on (Gtk::Widget& w, Gtk::Widget** parent); LIBGTKMM2EXT_API bool possibly_translate_keyval_to_make_legal_accelerator (uint32_t& keyval); - LIBGTKMM2EXT_API bool possibly_translate_mod_to_make_legal_accelerator (GdkModifierType& mod); LIBGTKMM2EXT_API uint32_t possibly_translate_legal_accelerator_to_real_key (uint32_t keyval); LIBGTKMM2EXT_API int physical_screen_height (Glib::RefPtr<Gdk::Window>); diff --git a/libs/gtkmm2ext/utils.cc b/libs/gtkmm2ext/utils.cc index a7790e6775..7fed1b8aee 100644 --- a/libs/gtkmm2ext/utils.cc +++ b/libs/gtkmm2ext/utils.cc @@ -382,30 +382,6 @@ Gtkmm2ext::detach_menu (Gtk::Menu& menu) } bool -Gtkmm2ext::possibly_translate_mod_to_make_legal_accelerator (GdkModifierType& mod) -{ -#ifdef GTKOSX - /* GTK on OS X is currently (February 2012) setting both - the Meta and Mod2 bits in the event modifier state if - the Command key is down. - - gtk_accel_groups_activate() does not invoke any of the logic - that gtk_window_activate_key() will that sorts out that stupid - state of affairs, and as a result it fails to find a match - for the key event and the current set of accelerators. - - to fix this, if the meta bit is set, remove the mod2 bit - from the modifier. this assumes that our bindings use Primary - which will have set the meta bit in the accelerator entry. - */ - if (mod & GDK_META_MASK) { - mod = GdkModifierType (mod & ~GDK_MOD2_MASK); - } -#endif - return true; -} - -bool Gtkmm2ext::possibly_translate_keyval_to_make_legal_accelerator (uint32_t& keyval) { int fakekey = GDK_VoidSymbol; |