Enable some key release event forwarding
This is needed for the virtual MIDI keyboard to trigger note-off events
This commit is contained in:
parent
ceee42f7af
commit
c456006f82
@ -71,6 +71,20 @@ ArdourWindow::on_key_press_event (GdkEventKey* ev)
|
||||
return handled;
|
||||
}
|
||||
|
||||
bool
|
||||
ArdourWindow::on_key_release_event (GdkEventKey* ev)
|
||||
{
|
||||
bool handled = Gtk::Window::on_key_press_event (ev);
|
||||
|
||||
if (!handled) {
|
||||
if (!get_modal()) {
|
||||
handled = relay_key_press (ev, this);
|
||||
}
|
||||
}
|
||||
|
||||
return handled;
|
||||
}
|
||||
|
||||
bool
|
||||
ArdourWindow::on_focus_in_event (GdkEventFocus *ev)
|
||||
{
|
||||
|
@ -47,6 +47,7 @@ protected:
|
||||
bool on_focus_out_event (GdkEventFocus*);
|
||||
bool on_delete_event (GdkEventAny *);
|
||||
bool on_key_press_event (GdkEventKey*);
|
||||
bool on_key_release_event (GdkEventKey*);
|
||||
void on_unmap ();
|
||||
|
||||
private:
|
||||
|
@ -275,8 +275,7 @@ Meterbridge::on_key_release_event (GdkEventKey* ev)
|
||||
if (gtk_window_propagate_key_event (GTK_WINDOW(gobj()), ev)) {
|
||||
return true;
|
||||
}
|
||||
/* don't forward releases */
|
||||
return true;
|
||||
return relay_key_press (ev, this);
|
||||
}
|
||||
|
||||
bool
|
||||
|
@ -439,13 +439,13 @@ PluginUIWindow::on_key_release_event (GdkEventKey *event)
|
||||
if (_pluginui) {
|
||||
if (_pluginui->non_gtk_gui()) {
|
||||
_pluginui->forward_key_event (event);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
gtk_window_propagate_key_event (GTK_WINDOW(gobj()), event);
|
||||
}
|
||||
/* don't forward releases */
|
||||
return true;
|
||||
return relay_key_press (event, this);
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user