diff options
author | Drew DeVault <[email protected]> | 2018-11-17 11:04:34 -0500 |
---|---|---|
committer | GitHub <[email protected]> | 2018-11-17 11:04:34 -0500 |
commit | eda3bfeed5097c71634332bfe998188b028abf02 (patch) | |
tree | a5fb241142cf6815a8fce76eb9b5faf101d69ff9 /sway/commands/resize.c | |
parent | a5cdc293dc8ae6759bd627aaf60d35d9eb4efb04 (diff) | |
parent | be9348d25c9556bdabb83d964a8761f920fc4a11 (diff) |
Merge pull request #3142 from RyanDwyer/move-view-properties
Move view {x,y,width,height} into container struct
Diffstat (limited to 'sway/commands/resize.c')
-rw-r--r-- | sway/commands/resize.c | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/sway/commands/resize.c b/sway/commands/resize.c index dc4e8000..a90d578e 100644 --- a/sway/commands/resize.c +++ b/sway/commands/resize.c @@ -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); |