Hardcoding it to L_HORIZ does not make sense to me,
as you get the unexpected behaviour that windows will be
arranged horizontally until you switch the layout.
- added L_AUTO_FIRST/LAST instead of using explicit layouts.
- when switching between auto layout that don't share the same major axis, invert the
width/height of their child views to preserve their relative proportions.
For workspace containers, swayc_change_layout also changes ->layout alongside
->workspace_layout when it's a sensible thing to do. There is an additional test
for 'layout toggle' command which ensures that containers will be tiled
horizontally after toggling from tabbed or stacked.
Add swayc_change_layout function, which changes either layout or
workspace_layout, depending on the container type. Workspace being
always L_HORIZ makes this much more i3-compatible.
When using a bar on a named output, load_swaybars() requires the
output to be active (ie. in the root container), but this is not the case if
the bar is added to the last output. To fix this, load_swaybars() is now
called after the output has been added to the root container.
After fixing that, swaybar would segfault due to using the wrong index
variable when loading outputs and config.
Tabbed/stacked containers are now created only if a view is present on
the workspace. If a view is created on previously empty tabbed/stacked
workspace, it gets wrapped in a container.
This fixes a segfault, when trying to get parent of the workspace/root container/(?), as it is not assuered that the view's parent node is not null in the loop
when creating a new output, move to that output all extant workspaces
that are assigned to that output.
(unrelated) remove comment that was no longer applicable, fix spacing in
an assignment
When creating a new view, wlc usually returns an initial geometry with
size 1x1. Setting those values as desired width/height causes a problem
for some windows (QT5) because they don't request a new geometry for
instance when made floating, so the floating window becomes 1x1.
To fix this problem we can just omit setting the desired width/height on
new_view and instead let the clients request a certain size if they feel
like it. e.i. gnome-calculator.
Fix#578