From a3b9f2dcfa649d9141f7bbb39e5eb951560eef72 Mon Sep 17 00:00:00 2001 From: Brian Ashworth Date: Sat, 2 Mar 2019 02:29:28 -0500 Subject: floating_maximum_size: change default behavior This changes the way zero (which is the default) is interpreted for both the width and height of `floating_maximum_size`. It now refers to the width and height of the entire output layout, which matches i3's behavior. This also removes duplicated code to calculate the floating constraints in three files. Before this, `container_init_floating` used two-thirds of the workspace width/height as the max and the entire workspace width/height was used everywhere else. Now, all callers use a single function `floating_calculate_constraints`. --- include/sway/tree/container.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/sway/tree/container.h') diff --git a/include/sway/tree/container.h b/include/sway/tree/container.h index f7a4ac37..d2508994 100644 --- a/include/sway/tree/container.h +++ b/include/sway/tree/container.h @@ -212,6 +212,9 @@ void container_update_representation(struct sway_container *container); */ size_t container_titlebar_height(void); +void floating_calculate_constraints(int *min_width, int *max_width, + int *min_height, int *max_height); + /** * Resize and center the container in its workspace. */ -- cgit v1.2.3-54-g00ecf