diff --git a/include/sway/view.h b/include/sway/view.h index 22f5ccf9b..f87a8d5bb 100644 --- a/include/sway/view.h +++ b/include/sway/view.h @@ -68,7 +68,7 @@ struct sway_view { struct { const char *(*get_prop)(struct sway_view *view, enum sway_view_prop prop); - void (*set_dimensions)(struct sway_view *view, + void (*set_size)(struct sway_view *view, int width, int height); } iface; }; diff --git a/sway/desktop/xdg_shell_v6.c b/sway/desktop/xdg_shell_v6.c index 45e443fcf..2545d1a68 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) { } } -static void set_dimensions(struct sway_view *view, int width, int height) { +static void set_size(struct sway_view *view, int width, int height) { if (!assert_xdg(view)) { return; } @@ -86,7 +86,7 @@ void handle_xdg_shell_v6_surface(struct wl_listener *listener, void *data) { } sway_view->type = SWAY_XDG_SHELL_V6_VIEW; sway_view->iface.get_prop = get_prop; - sway_view->iface.set_dimensions = set_dimensions; + sway_view->iface.set_size = set_size; sway_view->wlr_xdg_surface_v6 = xdg_surface; sway_view->sway_xdg_surface_v6 = sway_surface; sway_view->surface = xdg_surface->surface; diff --git a/sway/sway.5.txt b/sway/sway.5.txt index 750254c8f..2a4ef2056 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**( **resize** [] [px|ppt]:: Resizes the currently focused container or view by _amount_. _amount_ is - optional: the default value is 10 (either px or ppt depending on the view - type). The [px|ppt] parameter is optional. _px_ specifies that _amount_ refers - to pixels; _ppt_ specifies that _amount_ refers to percentage points of the - current dimension. Floating views use px dimensions by default (but can use - ppt if specified); tiled views use ppt dimensions by default (but can use px - if specified). + optional: the default value is 10 (either px or ppt depending on the view type). + The [px|ppt] parameter is optional. _px_ specifies that _amount_ refers to pixels; + _ppt_ specifies that _amount_ refers to percentage points of the current + size. Floating views use px by default (but can use ppt if specified); tiled + views use ppt by default (but can use px if specified). **resize set** [px] [px]:: Sets the width and height of the currently focused container to _width_ pixels and _height_ pixels. The [px] parameters are optional and have no effect. This - command only accepts pixel dimensions. + command only accepts a size in pixels. **resize set** [px] [ [px]]:: Sets the _width_ and/or _height_ of the currently focused container to _amount_. The [px] parameters are optional and have no effect. This command - only accepts pixel dimensions. + only accepts a size in pixels. **scratchpad show**:: Shows a window from the scratchpad. Repeatedly using this command will cycle @@ -254,14 +253,14 @@ The default colors are: *restart* is executed. **floating_maximum_size** x :: - Specifies the maximum dimensions of floating windows. - Uses the container dimensions as default. - -1 x -1 will remove any restriction on dimensions. + Specifies the maximum size of floating windows. + Uses the container size as default. + -1 x -1 will remove any restriction on size. 0 x 0 has the same behavior as not setting any value. If in conflict, this option has precedence over floating_minimum_size. **floating_minimum_size** x :: - Specifies the minimum dimensions of floating windows. + Specifies the minimum size of floating windows. Default parameters are 75 x 50. -1 and 0 are invalid parameters, default will be used instead. diff --git a/sway/tree/layout.c b/sway/tree/layout.c index ea7bb8bbf..2d442f2a4 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) { { container->width = width; container->height = height; - container->sway_view->iface.set_dimensions(container->sway_view, + container->sway_view->iface.set_size(container->sway_view, container->width, container->height); sway_log(L_DEBUG, "Set view to %.f x %.f @ %.f, %.f", container->width, container->height,