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
This commit is contained in:
Ryan Dwyer 2018-09-12 08:46:46 +10:00
parent df95c61044
commit 679c7eb08c
4 changed files with 19 additions and 15 deletions

View file

@ -1093,13 +1093,13 @@ void container_insert_child(struct sway_container *parent,
}
void container_add_sibling(struct sway_container *fixed,
struct sway_container *active, int side) {
struct sway_container *active, bool after) {
if (active->workspace) {
container_detach(active);
}
list_t *siblings = container_get_siblings(fixed);
int index = list_find(siblings, fixed);
list_insert(siblings, index + side, active);
list_insert(siblings, index + after, active);
active->parent = fixed->parent;
active->workspace = fixed->workspace;
container_for_each_child(active, set_workspace, NULL);