diff --git a/gtk2_ardour/editor_actions.cc b/gtk2_ardour/editor_actions.cc index 660a051600..a5edaf5759 100644 --- a/gtk2_ardour/editor_actions.cc +++ b/gtk2_ardour/editor_actions.cc @@ -1747,6 +1747,17 @@ Editor::reset_focus (Gtk::Widget* w) w = w->get_parent (); while (w) { + + if (w->is_toplevel()) { + /* Setting the focus widget to a Gtk::Window causes all + * subsequent calls to ::has_focus() on the nominal + * focus widget in that window to return + * false. Workaround: never set focus to the toplevel + * itself. + */ + break; + } + if (w->get_can_focus ()) { Window* win = dynamic_cast (top); win->set_focus (*w);