This reverts commit e9ee454ced.
This needs more work to preserve non-customized panners in existing
sessions. "user-panner" is only set if a user explicitly selects a
panner.
Use Editor::first_idle() which is invoked every time when a session
is loaded (via set_session). This will catch ALL successful
session loads.
Failed session-loads explicitly pop down the splash in
ARDOUR_UI::load_session.
This only leaves "abort session open" which returns to the
session-open dialog (which pops back the splash).
During ARDOUR_UI::finish(), after destroying various instances:
close_all_dialogs() -> ArdourDialog::on_response() -> GUIIdle()
The event loop recurses and may execute a previously scheduled
Editor::idle_visual_changer()
6af51b52 moved to dedicated show-editor/show-mixer actions for
keybindings because the Mixer has a dedicated handler.
For Control-surfaces a common action is still practical.
Note: This is still broken for detached windows. it currently only
toggles tabs correctly.
ARDOUR_UI::load_session() calls flush_pending() which runs
gtk_main_iteration()s until idle.
If a user selects another snapshot from the sidebar, load_session()
is called again (from a call to load session)
The midi_input_handler for the AsyncMIDIPort is connected to the
main event-loop. Events may still be delivered after the surface was
destroyed.
That by itself is not harmful, unless a given message produces a reply:
The _output_port is already gone, FaderPort8::tx_midi crashes.
When triggering Session::undo() or Session::redo() from a
non-GUI-thread (e.g. from a surface protocol) Ardour crashes if setting a
CairoWidget dirty due to a ENSURE_GUI_THREAD assertion. (see #7371)
By triggering undo by BasicUI::access_action() rather than by Session::undo()
we ensure that the GUI thread will finally call Session::undo().
So more like a workaround ... but better than crashing :)