mirror of
https://github.com/swaywm/sway.git
synced 2024-11-13 14:04:11 +01:00
Merge branch 'wlroots' into feature/wl-shell
This commit is contained in:
commit
823f6ee122
@ -68,7 +68,7 @@ struct sway_view {
|
|||||||
struct {
|
struct {
|
||||||
const char *(*get_prop)(struct sway_view *view,
|
const char *(*get_prop)(struct sway_view *view,
|
||||||
enum sway_view_prop prop);
|
enum sway_view_prop prop);
|
||||||
void (*set_dimensions)(struct sway_view *view,
|
void (*set_size)(struct sway_view *view,
|
||||||
int width, int height);
|
int width, int height);
|
||||||
} iface;
|
} iface;
|
||||||
};
|
};
|
||||||
|
@ -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)) {
|
if (!assert_xdg(view)) {
|
||||||
return;
|
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->type = SWAY_XDG_SHELL_V6_VIEW;
|
||||||
sway_view->iface.get_prop = get_prop;
|
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->wlr_xdg_surface_v6 = xdg_surface;
|
||||||
sway_view->sway_xdg_surface_v6 = sway_surface;
|
sway_view->sway_xdg_surface_v6 = sway_surface;
|
||||||
sway_view->surface = xdg_surface->surface;
|
sway_view->surface = xdg_surface->surface;
|
||||||
|
@ -126,22 +126,21 @@ They are expected to be used with **bindsym** or at runtime through **swaymsg**(
|
|||||||
|
|
||||||
**resize** <shrink|grow> <width|height> [<amount>] [px|ppt]::
|
**resize** <shrink|grow> <width|height> [<amount>] [px|ppt]::
|
||||||
Resizes the currently focused container or view by _amount_. _amount_ is
|
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
|
optional: the default value is 10 (either px or ppt depending on the view type).
|
||||||
type). The [px|ppt] parameter is optional. _px_ specifies that _amount_ refers
|
The [px|ppt] parameter is optional. _px_ specifies that _amount_ refers to pixels;
|
||||||
to pixels; _ppt_ specifies that _amount_ refers to percentage points of the
|
_ppt_ specifies that _amount_ refers to percentage points of the current
|
||||||
current dimension. Floating views use px dimensions by default (but can use
|
size. Floating views use px by default (but can use ppt if specified); tiled
|
||||||
ppt if specified); tiled views use ppt dimensions by default (but can use px
|
views use ppt by default (but can use px if specified).
|
||||||
if specified).
|
|
||||||
|
|
||||||
**resize set** <width> [px] <height> [px]::
|
**resize set** <width> [px] <height> [px]::
|
||||||
Sets the width and height of the currently focused container to _width_ pixels
|
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
|
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** <width|height> <amount> [px] [<width|height> <amount> [px]]::
|
**resize set** <width|height> <amount> [px] [<width|height> <amount> [px]]::
|
||||||
Sets the _width_ and/or _height_ of the currently focused container to
|
Sets the _width_ and/or _height_ of the currently focused container to
|
||||||
_amount_. The [px] parameters are optional and have no effect. This command
|
_amount_. The [px] parameters are optional and have no effect. This command
|
||||||
only accepts pixel dimensions.
|
only accepts a size in pixels.
|
||||||
|
|
||||||
**scratchpad show**::
|
**scratchpad show**::
|
||||||
Shows a window from the scratchpad. Repeatedly using this command will cycle
|
Shows a window from the scratchpad. Repeatedly using this command will cycle
|
||||||
@ -254,14 +253,14 @@ The default colors are:
|
|||||||
*restart* is executed.
|
*restart* is executed.
|
||||||
|
|
||||||
**floating_maximum_size** <width> x <height>::
|
**floating_maximum_size** <width> x <height>::
|
||||||
Specifies the maximum dimensions of floating windows.
|
Specifies the maximum size of floating windows.
|
||||||
Uses the container dimensions as default.
|
Uses the container size as default.
|
||||||
-1 x -1 will remove any restriction on dimensions.
|
-1 x -1 will remove any restriction on size.
|
||||||
0 x 0 has the same behavior as not setting any value.
|
0 x 0 has the same behavior as not setting any value.
|
||||||
If in conflict, this option has precedence over floating_minimum_size.
|
If in conflict, this option has precedence over floating_minimum_size.
|
||||||
|
|
||||||
**floating_minimum_size** <width> x <height>::
|
**floating_minimum_size** <width> x <height>::
|
||||||
Specifies the minimum dimensions of floating windows.
|
Specifies the minimum size of floating windows.
|
||||||
Default parameters are 75 x 50.
|
Default parameters are 75 x 50.
|
||||||
-1 and 0 are invalid parameters, default will be used instead.
|
-1 and 0 are invalid parameters, default will be used instead.
|
||||||
|
|
||||||
|
@ -155,7 +155,7 @@ void arrange_windows(swayc_t *container, double width, double height) {
|
|||||||
{
|
{
|
||||||
container->width = width;
|
container->width = width;
|
||||||
container->height = height;
|
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);
|
container->width, container->height);
|
||||||
sway_log(L_DEBUG, "Set view to %.f x %.f @ %.f, %.f",
|
sway_log(L_DEBUG, "Set view to %.f x %.f @ %.f, %.f",
|
||||||
container->width, container->height,
|
container->width, container->height,
|
||||||
|
Loading…
Reference in New Issue
Block a user