Fix gtk assert on key-propagation
This can happen when starting Ardour with the Preference pane as initial tab. The editor, mixer are not realized, so -propagation fails with: IA__gtk_widget_event: assertion 'WIDGET_REALIZED_FOR_EVENT (widget, event)' failed
This commit is contained in:
parent
b1ea0f3458
commit
d60a6a890d
@ -236,7 +236,7 @@ ARDOUR_UI::key_press_focus_accelerator_handler (Gtk::Window& window, GdkEventKey
|
|||||||
|
|
||||||
DEBUG_TRACE (DEBUG::Accelerators, "\tnot handled by binding activation, now propagate to window\n");
|
DEBUG_TRACE (DEBUG::Accelerators, "\tnot handled by binding activation, now propagate to window\n");
|
||||||
|
|
||||||
if (gtk_window_propagate_key_event (win, ev)) {
|
if (window.get_realized () && (!window.get_focus() || window.get_focus()->get_realized ()) && gtk_window_propagate_key_event (win, ev)) {
|
||||||
DEBUG_TRACE (DEBUG::Accelerators, "\tpropagate handled\n");
|
DEBUG_TRACE (DEBUG::Accelerators, "\tpropagate handled\n");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -247,7 +247,7 @@ ARDOUR_UI::key_press_focus_accelerator_handler (Gtk::Window& window, GdkEventKey
|
|||||||
|
|
||||||
DEBUG_TRACE (DEBUG::Accelerators, "\tpropagate, then activate\n");
|
DEBUG_TRACE (DEBUG::Accelerators, "\tpropagate, then activate\n");
|
||||||
|
|
||||||
if (gtk_window_propagate_key_event (win, ev)) {
|
if (window.get_realized () && (!window.get_focus() || window.get_focus()->get_realized ()) && gtk_window_propagate_key_event (win, ev)) {
|
||||||
DEBUG_TRACE (DEBUG::Accelerators, "\thandled by propagate\n");
|
DEBUG_TRACE (DEBUG::Accelerators, "\thandled by propagate\n");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user