Docks can now be resized in whole cells by dragging their inner border,
with the resize_window action and with kitten @ resize-window, where
wider or taller always means bigger whatever the edge of the dock. A
dock keeps at least one cell and grows only into the content it is
docked to, so the docks inside it are never shrunk. OS window docks do
not shrink the tab docks of any tab, and when dragged, the other tabs
are re-laid out once, at the end of the drag. Percentage sizes stay
percentages. The new size is stored in the DockSpec, so it is reported
by kitten @ ls and saved in sessions. Resetting window sizes does not
change docks, as they are not part of the layout.
Previously the inner border of a dock showed a resize pointer but
dragging it did nothing, or in the Tall layout moved a layout divider.
Fixes#10857
An OS window dock is shown in every tab of its OS window, below the tab
bar and outside the docks of the tab, and lives as long as the OS window.
It is a single window running a single program, which is kept in the
active tab: it is moved to the new active tab on every tab switch, by a
new C function that moves the window between tabs of an OS window
without recreating its GPU resources. Every tab reserves the space for
the OS window docks, so switching tabs does not resize any windows.
The docks are not closed with tabs and do not keep a tab open, stay in
their OS window when the tab containing them is moved to another OS
window, and are closed when the last other window in the OS window is
closed. They are listed as part of the active tab, and the dock entry of
every docked group in the output of kitten @ ls now has a scope of
window, tab or os-window. They are saved in sessions, once per OS window.
Fixes#10854
Allow creating docked windows with percentage or fixed sizes at any edge of a
window or tab. Fixes#2391
Also close#10506 and close#10508
The approach in #10506 was not used for several reasons.
1) Performance: this PR costs nothing when docs are unused vs several
milliseconds for the cassowary based approach
2) Way less code (700 lines total): No complicated solver (2K lines of code) needed
3) No risk behaviour changes for without docks