diff options
Diffstat (limited to 'gtk2_ardour/utils.cc')
-rw-r--r-- | gtk2_ardour/utils.cc | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/gtk2_ardour/utils.cc b/gtk2_ardour/utils.cc index c5faef2b0c..ad75577c3f 100644 --- a/gtk2_ardour/utils.cc +++ b/gtk2_ardour/utils.cc @@ -408,6 +408,9 @@ key_press_focus_accelerator_handler (Gtk::Window& window, GdkEventKey* ev) GtkWindow* win = window.gobj(); GtkWidget* focus = gtk_window_get_focus (win); bool special_handling_of_unmodified_accelerators = false; +#ifdef GTKOSX + bool allow_forwarding = true; +#endif #undef DEBUG_ACCELERATOR_HANDLING #ifdef DEBUG_ACCELERATOR_HANDLING @@ -419,6 +422,12 @@ key_press_focus_accelerator_handler (Gtk::Window& window, GdkEventKey* ev) } } +#ifdef GTKOSX + if (Keyboard::some_magic_widget_has_focus ()) { + allow_forwarding = false; + } +#endif + #ifdef DEBUG_ACCELERATOR_HANDLING if (debug) { cerr << "Win = " << win << " Key event: code = " << ev->keyval << " state = " << hex << ev->state << dec << " special handling ? " @@ -497,8 +506,9 @@ key_press_focus_accelerator_handler (Gtk::Window& window, GdkEventKey* ev) cerr << "\tactivate, then propagate\n"; } #endif + #ifdef GTKOSX - if (gdk_quartz_possibly_forward ((GdkEvent*) ev)) { + if (allow_forwarding && gdk_quartz_possibly_forward ((GdkEvent*) ev)) { return true; } #endif |