ensure that when mixer is shown in its own tab, it has a default focus widget, so...
[ardour.git] / gtk2_ardour / mixer_ui.cc
index 53cdca05a72eb9b87e093d35b9a42efab075a870..f197ba34a29332c37436c2900cc1dd10203dfadd 100644 (file)
@@ -390,13 +390,16 @@ Mixer_UI::use_own_window (bool and_fill_it)
 
        Gtk::Window* win = Tabbable::use_own_window (and_fill_it);
 
-
        if (win && new_window) {
                win->set_name ("MixerWindow");
                ARDOUR_UI::instance()->setup_toplevel_window (*win, _("Mixer"), this);
                win->signal_event().connect (sigc::bind (sigc::ptr_fun (&Keyboard::catch_user_event_for_pre_dialog_focus), win));
                win->set_data ("ardour-bindings", bindings);
                update_title ();
+               if (!win->get_focus()) {
+                       /* set focus widget to something, anything */
+                       win->set_focus (scroller);
+               }
        }
 
        return win;
@@ -857,7 +860,7 @@ Mixer_UI::sync_treeview_from_presentation_info (PropertyChange const & what_chan
                        }
                }
 
-               if (!_selection.axes.empty()) {
+               if (!_selection.axes.empty() && !PublicEditor::instance().track_selection_change_without_scroll ()) {
                        move_stripable_into_view ((*_selection.axes.begin())->stripable());
                }
        }
@@ -1340,6 +1343,7 @@ Mixer_UI::spill_redisplay (boost::shared_ptr<VCA> vca)
 
                AxisView* av = (*i)[stripable_columns.strip];
                MixerStrip* strip = dynamic_cast<MixerStrip*> (av);
+               bool const visible = (*i)[stripable_columns.visible];
 
                if (!strip) {
                        /* we're in the middle of changing a row, don't worry */
@@ -1363,7 +1367,7 @@ Mixer_UI::spill_redisplay (boost::shared_ptr<VCA> vca)
                        }
                }
 
-               if (slaved) {
+               if (slaved && visible) {
 
                        if (strip->packed()) {
                                strip_packer.reorder_child (*strip, -1); /* put at end */