diff options
author | Tony Crisci <tony@dubstepdish.com> | 2017-12-03 11:01:44 -0500 |
---|---|---|
committer | Tony Crisci <tony@dubstepdish.com> | 2017-12-03 11:01:44 -0500 |
commit | 802e7392f89a1e401a3953099ac5d477a461e469 (patch) | |
tree | f38154ed617c81c10e4054752d94806ee0c257bd | |
parent | Merge pull request #1489 from acrisci/feature/basic-get-tree (diff) | |
download | sway-802e7392f89a1e401a3953099ac5d477a461e469.tar.gz sway-802e7392f89a1e401a3953099ac5d477a461e469.tar.zst sway-802e7392f89a1e401a3953099ac5d477a461e469.zip |
use "size" instead of "dimensions"
-rw-r--r-- | include/sway/view.h | 2 | ||||
-rw-r--r-- | sway/desktop/xdg_shell_v6.c | 4 | ||||
-rw-r--r-- | sway/sway.5.txt | 23 | ||||
-rw-r--r-- | sway/tree/layout.c | 2 |
4 files changed, 15 insertions, 16 deletions
diff --git a/include/sway/view.h b/include/sway/view.h index 2707ca78..cf2e6f66 100644 --- a/include/sway/view.h +++ b/include/sway/view.h | |||
@@ -55,7 +55,7 @@ struct sway_view { | |||
55 | struct { | 55 | struct { |
56 | const char *(*get_prop)(struct sway_view *view, | 56 | const char *(*get_prop)(struct sway_view *view, |
57 | enum sway_view_prop prop); | 57 | enum sway_view_prop prop); |
58 | void (*set_dimensions)(struct sway_view *view, | 58 | void (*set_size)(struct sway_view *view, |
59 | int width, int height); | 59 | int width, int height); |
60 | } iface; | 60 | } iface; |
61 | }; | 61 | }; |
diff --git a/sway/desktop/xdg_shell_v6.c b/sway/desktop/xdg_shell_v6.c index 45e443fc..2545d1a6 100644 --- a/sway/desktop/xdg_shell_v6.c +++ b/sway/desktop/xdg_shell_v6.c | |||
@@ -28,7 +28,7 @@ static const char *get_prop(struct sway_view *view, enum sway_view_prop prop) { | |||
28 | } | 28 | } |
29 | } | 29 | } |
30 | 30 | ||
31 | static void set_dimensions(struct sway_view *view, int width, int height) { | 31 | static void set_size(struct sway_view *view, int width, int height) { |
32 | if (!assert_xdg(view)) { | 32 | if (!assert_xdg(view)) { |
33 | return; | 33 | return; |
34 | } | 34 | } |
@@ -86,7 +86,7 @@ void handle_xdg_shell_v6_surface(struct wl_listener *listener, void *data) { | |||
86 | } | 86 | } |
87 | sway_view->type = SWAY_XDG_SHELL_V6_VIEW; | 87 | sway_view->type = SWAY_XDG_SHELL_V6_VIEW; |
88 | sway_view->iface.get_prop = get_prop; | 88 | sway_view->iface.get_prop = get_prop; |
89 | sway_view->iface.set_dimensions = set_dimensions; | 89 | sway_view->iface.set_size = set_size; |
90 | sway_view->wlr_xdg_surface_v6 = xdg_surface; | 90 | sway_view->wlr_xdg_surface_v6 = xdg_surface; |
91 | sway_view->sway_xdg_surface_v6 = sway_surface; | 91 | sway_view->sway_xdg_surface_v6 = sway_surface; |
92 | sway_view->surface = xdg_surface->surface; | 92 | sway_view->surface = xdg_surface->surface; |
diff --git a/sway/sway.5.txt b/sway/sway.5.txt index 750254c8..2a4ef205 100644 --- a/sway/sway.5.txt +++ b/sway/sway.5.txt | |||
@@ -126,22 +126,21 @@ They are expected to be used with **bindsym** or at runtime through **swaymsg**( | |||
126 | 126 | ||
127 | **resize** <shrink|grow> <width|height> [<amount>] [px|ppt]:: | 127 | **resize** <shrink|grow> <width|height> [<amount>] [px|ppt]:: |
128 | Resizes the currently focused container or view by _amount_. _amount_ is | 128 | Resizes the currently focused container or view by _amount_. _amount_ is |
129 | optional: the default value is 10 (either px or ppt depending on the view | 129 | optional: the default value is 10 (either px or ppt depending on the view type). |
130 | type). The [px|ppt] parameter is optional. _px_ specifies that _amount_ refers | 130 | The [px|ppt] parameter is optional. _px_ specifies that _amount_ refers to pixels; |
131 | to pixels; _ppt_ specifies that _amount_ refers to percentage points of the | 131 | _ppt_ specifies that _amount_ refers to percentage points of the current |
132 | current dimension. Floating views use px dimensions by default (but can use | 132 | size. Floating views use px by default (but can use ppt if specified); tiled |
133 | ppt if specified); tiled views use ppt dimensions by default (but can use px | 133 | views use ppt by default (but can use px if specified). |
134 | if specified). | ||
135 | 134 | ||
136 | **resize set** <width> [px] <height> [px]:: | 135 | **resize set** <width> [px] <height> [px]:: |
137 | Sets the width and height of the currently focused container to _width_ pixels | 136 | Sets the width and height of the currently focused container to _width_ pixels |
138 | and _height_ pixels. The [px] parameters are optional and have no effect. This | 137 | and _height_ pixels. The [px] parameters are optional and have no effect. This |
139 | command only accepts pixel dimensions. | 138 | command only accepts a size in pixels. |
140 | 139 | ||
141 | **resize set** <width|height> <amount> [px] [<width|height> <amount> [px]]:: | 140 | **resize set** <width|height> <amount> [px] [<width|height> <amount> [px]]:: |
142 | Sets the _width_ and/or _height_ of the currently focused container to | 141 | Sets the _width_ and/or _height_ of the currently focused container to |
143 | _amount_. The [px] parameters are optional and have no effect. This command | 142 | _amount_. The [px] parameters are optional and have no effect. This command |
144 | only accepts pixel dimensions. | 143 | only accepts a size in pixels. |
145 | 144 | ||
146 | **scratchpad show**:: | 145 | **scratchpad show**:: |
147 | Shows a window from the scratchpad. Repeatedly using this command will cycle | 146 | Shows a window from the scratchpad. Repeatedly using this command will cycle |
@@ -254,14 +253,14 @@ The default colors are: | |||
254 | *restart* is executed. | 253 | *restart* is executed. |
255 | 254 | ||
256 | **floating_maximum_size** <width> x <height>:: | 255 | **floating_maximum_size** <width> x <height>:: |
257 | Specifies the maximum dimensions of floating windows. | 256 | Specifies the maximum size of floating windows. |
258 | Uses the container dimensions as default. | 257 | Uses the container size as default. |
259 | -1 x -1 will remove any restriction on dimensions. | 258 | -1 x -1 will remove any restriction on size. |
260 | 0 x 0 has the same behavior as not setting any value. | 259 | 0 x 0 has the same behavior as not setting any value. |
261 | If in conflict, this option has precedence over floating_minimum_size. | 260 | If in conflict, this option has precedence over floating_minimum_size. |
262 | 261 | ||
263 | **floating_minimum_size** <width> x <height>:: | 262 | **floating_minimum_size** <width> x <height>:: |
264 | Specifies the minimum dimensions of floating windows. | 263 | Specifies the minimum size of floating windows. |
265 | Default parameters are 75 x 50. | 264 | Default parameters are 75 x 50. |
266 | -1 and 0 are invalid parameters, default will be used instead. | 265 | -1 and 0 are invalid parameters, default will be used instead. |
267 | 266 | ||
diff --git a/sway/tree/layout.c b/sway/tree/layout.c index ea7bb8bb..2d442f2a 100644 --- a/sway/tree/layout.c +++ b/sway/tree/layout.c | |||
@@ -155,7 +155,7 @@ void arrange_windows(swayc_t *container, double width, double height) { | |||
155 | { | 155 | { |
156 | container->width = width; | 156 | container->width = width; |
157 | container->height = height; | 157 | container->height = height; |
158 | container->sway_view->iface.set_dimensions(container->sway_view, | 158 | container->sway_view->iface.set_size(container->sway_view, |
159 | container->width, container->height); | 159 | container->width, container->height); |
160 | sway_log(L_DEBUG, "Set view to %.f x %.f @ %.f, %.f", | 160 | sway_log(L_DEBUG, "Set view to %.f x %.f @ %.f, %.f", |
161 | container->width, container->height, | 161 | container->width, container->height, |