swayfx/sway
Ryan Dwyer f5b9815128 Prepare arrange code for type safe arguments
This commit changes the arrange code in a way that will support type
safe arguments.

The arrange_output et al functions are now public, however I opted not
to use them directly yet. I've kept the generic arrange_windows there
for convenience until type safety is fully implemented. This means this
patch has much less risk of breaking things as it would otherwise.

To be type safe, arrange_children_of cannot exist in its previous form
because the thing passed to it could be either a workspace or a
container. So it's now renamed to arrange_children and accepts a list_t,
as well as the parent layout and parent's box.

There was some code which checked the grandparent's layout to see if it
was tabbed or stacked and adjusted the Y offset of the grandchild
accordingly. Accessing the grandparent layout isn't easy when using type
safe arguments, and it seemed odd to even need to do this. I determined
that this was needed because a child of a tabbed container would have a
swayc Y matching the top of the tab bar. I've changed this so a child of
a tabbed container will have a swayc Y matching the bottom of the tab
bar, which means we don't need to access the grandparent layout.  Some
tweaks to the rendering and autoconfigure code have been made to
implement this, and the container_at code appears to work without
needing any changes.

arrange_children_of (now arrange_children) would check if the parent had
gaps and would copy them to the child, effectively making the
workspace's gaps recurse into all children. We can't do this any more
without passing has_gaps, gaps_inner and gaps_outer as arguments to
arrange_children, so I've changed the add_gaps function to retrieve it
from the workspace directly.

apply_tabbed_or_stacked_layout has been split into two functions, as it
had different logic depending on the layout.

Lastly, arrange.h had an unnecessary include of transaction.h. I've
removed it, which means I've had to add it to several other files.
2018-08-28 23:50:41 +10:00
..
commands Initialise variable properly 2018-08-27 18:01:17 +12:00
config Merge pull request #2513 from RyanDwyer/rename-root-outputs 2018-08-26 10:50:02 -04:00
desktop Prepare arrange code for type safe arguments 2018-08-28 23:50:41 +10:00
input seat.c: clean-up seat_set_focus_warp function 2018-08-27 13:25:01 +01:00
tree Prepare arrange code for type safe arguments 2018-08-28 23:50:41 +10:00
base64.c Rework get_clipboard implementation 2017-07-07 21:51:34 +02:00
commands.c commands: add nop 2018-08-18 15:50:26 +01:00
config.c Remove layout.c 2018-08-26 12:05:16 +10:00
criteria.c Remove layout.c 2018-08-26 12:05:16 +10:00
debug-tree.c Remove layout.c 2018-08-26 12:05:16 +10:00
decoration.c Handle views created after decoration mode is sent for xdg-shell 2018-08-06 15:20:30 +01:00
ipc-json.c Add app_id and class to get_tree output 2018-08-21 20:51:01 -04:00
ipc-server.c Merge pull request #2513 from RyanDwyer/rename-root-outputs 2018-08-26 10:50:02 -04:00
main.c Remove layout.c 2018-08-26 12:05:16 +10:00
meson.build Remove layout.c 2018-08-26 12:05:16 +10:00
security.c Add minimal config subsystem 2017-12-05 10:40:55 +01:00
server.c Remove layout.c 2018-08-26 12:05:16 +10:00
sway-bar.5.scd Add sway-bar(5) 2018-05-11 21:13:43 -04:00
sway-input.5.scd Escaping underscores in tap_button_map 2018-07-29 14:47:53 +02:00
sway.1.scd delete references to swaygrab 2018-07-30 16:24:46 +01:00
sway.5.scd commands: implement move absolute 2018-08-20 10:17:32 +01:00
swaynag.c Fix compiler errors. 2018-08-05 00:24:44 -07:00