mirror of
https://github.com/swaywm/sway.git
synced 2024-11-23 08:21:28 +00:00
Address @emersion feedback
This commit is contained in:
parent
c8be7bfc1e
commit
5ff16994c5
|
@ -91,7 +91,7 @@ void update_debug_tree() {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct sway_container *focus;
|
struct sway_container *focus = NULL;
|
||||||
if (seat != NULL) {
|
if (seat != NULL) {
|
||||||
focus = seat_get_focus(seat);
|
focus = seat_get_focus(seat);
|
||||||
}
|
}
|
||||||
|
|
|
@ -250,6 +250,9 @@ static int container_limit(struct sway_container *container,
|
||||||
return move_offs(move_dir) < 0 ? 0 : container->children->length - 1;
|
return move_offs(move_dir) < 0 ? 0 : container->children->length - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Takes one child, sets it aside, wraps the rest of the children in a new
|
||||||
|
* container, switches the layout of the workspace, and drops the child back in.
|
||||||
|
* In other words, rejigger it. */
|
||||||
static void workspace_rejigger(struct sway_container *ws,
|
static void workspace_rejigger(struct sway_container *ws,
|
||||||
struct sway_container *child, enum movement_direction move_dir) {
|
struct sway_container *child, enum movement_direction move_dir) {
|
||||||
struct sway_container *original_parent = child->parent;
|
struct sway_container *original_parent = child->parent;
|
||||||
|
@ -311,8 +314,8 @@ void container_move(struct sway_container *container,
|
||||||
sway_dir_to_wlr(move_dir, &wlr_dir);
|
sway_dir_to_wlr(move_dir, &wlr_dir);
|
||||||
double ref_x = current->x + current->width / 2;
|
double ref_x = current->x + current->width / 2;
|
||||||
double ref_y = current->y + current->height / 2;
|
double ref_y = current->y + current->height / 2;
|
||||||
ref_x += current->sway_output->wlr_output->lx;
|
ref_x += current->sway_output->swayc->x;
|
||||||
ref_y += current->sway_output->wlr_output->ly;
|
ref_y += current->sway_output->swayc->y;
|
||||||
struct wlr_output *next = wlr_output_layout_adjacent_output(
|
struct wlr_output *next = wlr_output_layout_adjacent_output(
|
||||||
root_container.sway_root->output_layout, wlr_dir,
|
root_container.sway_root->output_layout, wlr_dir,
|
||||||
current->sway_output->wlr_output,
|
current->sway_output->wlr_output,
|
||||||
|
|
Loading…
Reference in a new issue