Make the first view own the toolbar instead of the main window
Handling multiple sessions requires that every session can be
controlled individually. This means that either
a) there could be one toolbar that adjusts dynamically to the
session whose view currently has focus
or
b) every session has its own toolbar.
I opted for b) because it's more intuitive and more straightforward
to implement. So now every session has a main view (the first one
created) and a main bar that sits in the same dock widget.