mirror of
https://github.com/swaywm/sway.git
synced 2025-11-07 13:29:56 -05:00
Merge pull request #3142 from RyanDwyer/move-view-properties
Move view {x,y,width,height} into container struct
This commit is contained in:
commit
eda3bfeed5
15 changed files with 156 additions and 160 deletions
|
|
@ -93,7 +93,7 @@ struct cmd_results *cmd_border(int argc, char **argv) {
|
|||
}
|
||||
|
||||
if (container_is_floating(container)) {
|
||||
container_set_geometry_from_floating_view(container);
|
||||
container_set_geometry_from_content(container);
|
||||
}
|
||||
|
||||
arrange_container(container);
|
||||
|
|
|
|||
|
|
@ -404,13 +404,10 @@ static struct cmd_results *resize_adjust_floating(enum resize_axis axis,
|
|||
con->width += grow_width;
|
||||
con->height += grow_height;
|
||||
|
||||
if (con->view) {
|
||||
struct sway_view *view = con->view;
|
||||
view->x += grow_x;
|
||||
view->y += grow_y;
|
||||
view->width += grow_width;
|
||||
view->height += grow_height;
|
||||
}
|
||||
con->content_x += grow_x;
|
||||
con->content_y += grow_y;
|
||||
con->content_width += grow_width;
|
||||
con->content_height += grow_height;
|
||||
|
||||
arrange_container(con);
|
||||
|
||||
|
|
@ -546,13 +543,10 @@ static struct cmd_results *resize_set_floating(struct sway_container *con,
|
|||
}
|
||||
}
|
||||
|
||||
if (con->view) {
|
||||
struct sway_view *view = con->view;
|
||||
view->x -= grow_width / 2;
|
||||
view->y -= grow_height / 2;
|
||||
view->width += grow_width;
|
||||
view->height += grow_height;
|
||||
}
|
||||
con->content_x -= grow_width / 2;
|
||||
con->content_y -= grow_height / 2;
|
||||
con->content_width += grow_width;
|
||||
con->content_height += grow_height;
|
||||
|
||||
arrange_container(con);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue