aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2019-01-14 21:22:53 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2019-01-15 08:01:21 +1000
commit2024f1da72d5144a30864d815608e2e856639bf6 (patch)
treee924279ea83525a67b25367baa68a8fb38116324 /include
parentDisarm key repeat on reload (diff)
downloadsway-2024f1da72d5144a30864d815608e2e856639bf6.tar.gz
sway-2024f1da72d5144a30864d815608e2e856639bf6.tar.zst
sway-2024f1da72d5144a30864d815608e2e856639bf6.zip
Resize only current and immediate siblings rather than all siblings
For example, create layout V[view view view] and resize the leftmost view using mod+rightclick. Previously, the edge between view 2 and 3 would be adjusted as well. Now this edge will remain constant, which matches the behaviour of i3. To do this operation correctly, the resize tiling seatop now keeps track of two containers, as the container that resizes horizontally will be a different container to the one which resizes vertically (one will be an ancestor). The tiling resize seatop now figures out these containers during the start of the operation and keeps references to them in the event. A new function container_find_resize_parent has been introduced to do this. This function is also used by the resize command. During cursor motion, the seatop logic is similar to before, but now has to choose the correct container to resize. In resize.c, container_resize_tiled and resize_tiled have been merged into one. One of them originally did nothing except pass the values through to the other. container_resize_tiled now takes a simplified approach where it just finds the immediate siblings on either side and resizes them without worrying about the others. The parellel_coord and parallel_size functions are no longer needed and have been removed.
Diffstat (limited to 'include')
-rw-r--r--include/sway/commands.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/sway/commands.h b/include/sway/commands.h
index 657f909e..68487879 100644
--- a/include/sway/commands.h
+++ b/include/sway/commands.h
@@ -92,9 +92,12 @@ struct cmd_results *add_color(char *buffer, const char *color);
92/** 92/**
93 * TODO: Move this function and its dependent functions to container.c. 93 * TODO: Move this function and its dependent functions to container.c.
94 */ 94 */
95void container_resize_tiled(struct sway_container *parent, enum wlr_edges edge, 95void container_resize_tiled(struct sway_container *parent, uint32_t axis,
96 int amount); 96 int amount);
97 97
98struct sway_container *container_find_resize_parent(struct sway_container *con,
99 uint32_t edge);
100
98sway_cmd cmd_assign; 101sway_cmd cmd_assign;
99sway_cmd cmd_bar; 102sway_cmd cmd_bar;
100sway_cmd cmd_bindcode; 103sway_cmd cmd_bindcode;