summaryrefslogtreecommitdiff
path: root/gtk2_ardour/utils.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2008-10-28 00:24:56 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2008-10-28 00:24:56 +0000
commite7cebfb6c5807c84abe972523575af35b0f8607d (patch)
tree64b84743cbb9f0810675a91a384db81b4071767a /gtk2_ardour/utils.cc
parent5adebc96ad225db735ed9a5c011206b0fb2c8cf0 (diff)
start handling plugin window keyboard focus (in-progress)
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@4021 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/utils.cc')
-rw-r--r--gtk2_ardour/utils.cc12
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