diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-09-12 08:46:46 +1000 |
---|---|---|
committer | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-09-12 08:46:46 +1000 |
commit | 679c7eb08c16daea8e3e1cff7bcf179e116d0e8e (patch) | |
tree | 82daa71d644f15c2e1e58ca9bdb2d4e1a75d3be9 /sway/tree/container.c | |
parent | Fix crash in workspace_wrap_children (diff) | |
download | sway-679c7eb08c16daea8e3e1cff7bcf179e116d0e8e.tar.gz sway-679c7eb08c16daea8e3e1cff7bcf179e116d0e8e.tar.zst sway-679c7eb08c16daea8e3e1cff7bcf179e116d0e8e.zip |
Minor fixes to tiling drag implementation
* Make container_add_sibling's `after` argument a boolean.
* Use a constant for drop layout border
* Make thickness an int
* Add button state check
* Move comments in seat_end_move_tiling
Diffstat (limited to 'sway/tree/container.c')
-rw-r--r-- | sway/tree/container.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c index 21a0cd76..df064573 100644 --- a/sway/tree/container.c +++ b/sway/tree/container.c | |||
@@ -1093,13 +1093,13 @@ void container_insert_child(struct sway_container *parent, | |||
1093 | } | 1093 | } |
1094 | 1094 | ||
1095 | void container_add_sibling(struct sway_container *fixed, | 1095 | void container_add_sibling(struct sway_container *fixed, |
1096 | struct sway_container *active, int side) { | 1096 | struct sway_container *active, bool after) { |
1097 | if (active->workspace) { | 1097 | if (active->workspace) { |
1098 | container_detach(active); | 1098 | container_detach(active); |
1099 | } | 1099 | } |
1100 | list_t *siblings = container_get_siblings(fixed); | 1100 | list_t *siblings = container_get_siblings(fixed); |
1101 | int index = list_find(siblings, fixed); | 1101 | int index = list_find(siblings, fixed); |
1102 | list_insert(siblings, index + side, active); | 1102 | list_insert(siblings, index + after, active); |
1103 | active->parent = fixed->parent; | 1103 | active->parent = fixed->parent; |
1104 | active->workspace = fixed->workspace; | 1104 | active->workspace = fixed->workspace; |
1105 | container_for_each_child(active, set_workspace, NULL); | 1105 | container_for_each_child(active, set_workspace, NULL); |