diff options
author | Ronan Pigott <rpigott@berkeley.edu> | 2020-07-06 23:57:48 -0700 |
---|---|---|
committer | Brian Ashworth <bosrsf04@gmail.com> | 2020-07-13 00:21:52 -0400 |
commit | 39d677af15bd4c8cdea6b62fda80ac9a9e998045 (patch) | |
tree | 0612524effa083389ecce17d0f0dafad8f25d6ec /sway/tree | |
parent | 10ec97c073ea7c06f7c129a4baa4576783248148 (diff) | |
download | sway-39d677af15bd4c8cdea6b62fda80ac9a9e998045.tar.xz |
input: implement xdg_toplevel interactive resize hints
Diffstat (limited to 'sway/tree')
-rw-r--r-- | sway/tree/container.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c index fa1598ef..65696f15 100644 --- a/sway/tree/container.c +++ b/sway/tree/container.c @@ -746,6 +746,28 @@ void container_floating_set_default_size(struct sway_container *con) { free(box); } + +/** + * Indicate to clients in this container that they are participating in (or + * have just finished) an interactive resize + */ +void container_set_resizing(struct sway_container *con, bool resizing) { + if (!con) { + return; + } + + if (con->view) { + if (con->view->impl->set_resizing) { + con->view->impl->set_resizing(con->view, resizing); + } + } else { + for (int i = 0; i < con->children->length; ++i ) { + struct sway_container *child = con->children->items[i]; + container_set_resizing(child, resizing); + } + } +} + void container_set_floating(struct sway_container *container, bool enable) { if (container_is_floating(container) == enable) { return; |