This branch implements the empty tabbed container behavior described in #34. It inserts a "placeholder" container into an L_TABBED container when it would otherwise become empty, and removes the placeholder when a window is added to the "empty" L_TABBED container. There were a number of additional changes required to accommodate these placeholder containers, but overall the intrusiveness doesn't seem to be too bad. The behavior seems to be a lot closer to Notion now.
Things that are working:
- A tabbed container can have all of its windows removed, but it will still exist and prevent the layout from being rearranged.
- Closing an empty tabbed container.
- Keybindings (
focus rightetc.) work to focus into or out of an empty tabbed container. - The keybindings in #5 work to move a window into an empty tabbed container, or out of a tabbed container so that an empty tab container is left behind.
- Dragging a window into a tabbed container, by dropping it on any of the drag targets that appear over the destination container.
- Dragging the last window out of a tabbed container into another, empty tabbed container.
- Empty tabbed containers have a normal looking titlebar with a single tab and the titlebar text
<empty>. - Empty tabbed containers cannot be dragged into other containers.
- Mousing over an empty tabbed container focuses it, when focus-follows-mouse is enabled.
- When the sole, focused window of a tabbed container is closed, the focus stays in the now-empty tabbed container.
- If the last window in a tabbed container is not focused, closing it does not reset the focus.
- If
mouse_warping containeris configured, the mouse cursor will consider warping to the newly focused child container after a split. - A container with a single window in it can be split into a container with the original window and an empty tabbed container.