diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2016-09-06 15:39:50 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2016-09-06 15:39:50 -0400 |
commit | ff4e9cc1df27ba1b1220176b4752ee6bc19f177d (patch) | |
tree | 55c2e929439d172c36a6face4441b0cce38f9008 /gtk2_ardour/editor_actions.cc | |
parent | ab21b241f73965b48b2a85aa391a4f741c3a6078 (diff) |
do not set the focus widget to be a toplevel window in Editor::reset_focus.
See comments in code for the reason why
Diffstat (limited to 'gtk2_ardour/editor_actions.cc')
-rw-r--r-- | gtk2_ardour/editor_actions.cc | 11 |
1 files changed, 11 insertions, 0 deletions
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<Window*> (top); win->set_focus (*w); |