aboutsummaryrefslogtreecommitdiffstats
path: root/sway/tree/container.c
diff options
context:
space:
mode:
authorLibravatar Ronan Pigott <rpigott@berkeley.edu>2020-07-06 23:57:48 -0700
committerLibravatar Brian Ashworth <bosrsf04@gmail.com>2020-07-13 00:21:52 -0400
commit39d677af15bd4c8cdea6b62fda80ac9a9e998045 (patch)
tree0612524effa083389ecce17d0f0dafad8f25d6ec /sway/tree/container.c
parentrephrase swayidle-timout example to improve readability (diff)
downloadsway-39d677af15bd4c8cdea6b62fda80ac9a9e998045.tar.gz
sway-39d677af15bd4c8cdea6b62fda80ac9a9e998045.tar.zst
sway-39d677af15bd4c8cdea6b62fda80ac9a9e998045.zip
input: implement xdg_toplevel interactive resize hints
Diffstat (limited to 'sway/tree/container.c')
-rw-r--r--sway/tree/container.c22
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) {
746 free(box); 746 free(box);
747} 747}
748 748
749
750/**
751 * Indicate to clients in this container that they are participating in (or
752 * have just finished) an interactive resize
753 */
754void container_set_resizing(struct sway_container *con, bool resizing) {
755 if (!con) {
756 return;
757 }
758
759 if (con->view) {
760 if (con->view->impl->set_resizing) {
761 con->view->impl->set_resizing(con->view, resizing);
762 }
763 } else {
764 for (int i = 0; i < con->children->length; ++i ) {
765 struct sway_container *child = con->children->items[i];
766 container_set_resizing(child, resizing);
767 }
768 }
769}
770
749void container_set_floating(struct sway_container *container, bool enable) { 771void container_set_floating(struct sway_container *container, bool enable) {
750 if (container_is_floating(container) == enable) { 772 if (container_is_floating(container) == enable) {
751 return; 773 return;