diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-04-06 15:57:57 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-06 15:57:57 -0400 |
commit | 656ef558a2a8d55cf77cbcc8ce01c861cb78ac97 (patch) | |
tree | 243104969dc80855d313faf5a0d360dd5508dc52 /sway/commands/resize.c | |
parent | Merge pull request #1755 from emersion/view-child-hidpi (diff) | |
parent | Break everything^W^WUse wlr_box for sway_container (diff) | |
download | sway-656ef558a2a8d55cf77cbcc8ce01c861cb78ac97.tar.gz sway-656ef558a2a8d55cf77cbcc8ce01c861cb78ac97.tar.zst sway-656ef558a2a8d55cf77cbcc8ce01c861cb78ac97.zip |
Merge pull request #1757 from swaywm/boooooooxes
Break everything^W^WUse wlr_box for sway_container
Diffstat (limited to 'sway/commands/resize.c')
-rw-r--r-- | sway/commands/resize.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sway/commands/resize.c b/sway/commands/resize.c index 93c1fe7d..8e295f65 100644 --- a/sway/commands/resize.c +++ b/sway/commands/resize.c | |||
@@ -48,11 +48,11 @@ static enum resize_axis parse_resize_axis(const char *axis) { | |||
48 | } | 48 | } |
49 | 49 | ||
50 | static int parallel_coord(struct sway_container *c, enum resize_axis a) { | 50 | static int parallel_coord(struct sway_container *c, enum resize_axis a) { |
51 | return a == RESIZE_AXIS_HORIZONTAL ? c->x : c->y; | 51 | return a == RESIZE_AXIS_HORIZONTAL ? c->box.x : c->box.y; |
52 | } | 52 | } |
53 | 53 | ||
54 | static int parallel_size(struct sway_container *c, enum resize_axis a) { | 54 | static int parallel_size(struct sway_container *c, enum resize_axis a) { |
55 | return a == RESIZE_AXIS_HORIZONTAL ? c->width : c->height; | 55 | return a == RESIZE_AXIS_HORIZONTAL ? c->box.width : c->box.height; |
56 | } | 56 | } |
57 | 57 | ||
58 | static void resize_tiled(int amount, enum resize_axis axis) { | 58 | static void resize_tiled(int amount, enum resize_axis axis) { |
@@ -196,10 +196,10 @@ static void resize(int amount, enum resize_axis axis, enum resize_unit unit) { | |||
196 | float pct = amount / 100.0f; | 196 | float pct = amount / 100.0f; |
197 | switch (axis) { | 197 | switch (axis) { |
198 | case RESIZE_AXIS_HORIZONTAL: | 198 | case RESIZE_AXIS_HORIZONTAL: |
199 | amount = (float)current->width * pct; | 199 | amount = (float)current->box.width * pct; |
200 | break; | 200 | break; |
201 | case RESIZE_AXIS_VERTICAL: | 201 | case RESIZE_AXIS_VERTICAL: |
202 | amount = (float)current->height * pct; | 202 | amount = (float)current->box.height * pct; |
203 | break; | 203 | break; |
204 | default: | 204 | default: |
205 | sway_assert(0, "invalid resize axis"); | 205 | sway_assert(0, "invalid resize axis"); |