diff options
author | Robin Gareus <robin@gareus.org> | 2019-11-22 22:11:55 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2019-11-22 22:11:55 +0100 |
commit | ceee42f7af55eeb8e65caeee8495a38286b792f8 (patch) | |
tree | 938052d64834fa9de1b7aaec993b634e21f958fa | |
parent | 98bcfb14852b3b9fdae34fdc6330806d3a466d73 (diff) |
Virtual MIDI keyboard, when visible, gets to handle keyboard input first
-rw-r--r-- | gtk2_ardour/ardour_ui_keys.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gtk2_ardour/ardour_ui_keys.cc b/gtk2_ardour/ardour_ui_keys.cc index 17c3ebeb73..662eff5762 100644 --- a/gtk2_ardour/ardour_ui_keys.cc +++ b/gtk2_ardour/ardour_ui_keys.cc @@ -40,6 +40,7 @@ #include "debug.h" #include "keyboard.h" #include "public_editor.h" +#include "virtual_keyboard_window.h" using namespace ARDOUR; using namespace PBD; @@ -54,6 +55,12 @@ ARDOUR_UI::key_event_handler (GdkEventKey* ev, Gtk::Window* event_window) Gtkmm2ext::Bindings* bindings = 0; Gtk::Window* window = 0; + if (virtual_keyboard_window && virtual_keyboard_window->is_visible()) { + if (gtk_window_propagate_key_event (virtual_keyboard_window->gobj(), ev)) { + return true; + } + } + /* until we get ardour bindings working, we are not handling key * releases yet. */ |