summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLibravatar Brian Ashworth <bosrsf04@gmail.com>2019-03-02 02:29:28 -0500
committerLibravatar emersion <contact@emersion.fr>2019-03-02 09:10:26 +0100
commit430359519c1cb9583020fc8da04f5ecc31b0e914 (patch)
treea2b8287babeb96e63953de8d4bb68bc422029fe9 /include
parentMinor fix of code duplication. (diff)
downloadsway-430359519c1cb9583020fc8da04f5ecc31b0e914.tar.gz
sway-430359519c1cb9583020fc8da04f5ecc31b0e914.tar.zst
sway-430359519c1cb9583020fc8da04f5ecc31b0e914.zip
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`.
Diffstat (limited to 'include')
-rw-r--r--include/sway/tree/container.h3
1 files changed, 3 insertions, 0 deletions
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);
212 */ 212 */
213size_t container_titlebar_height(void); 213size_t container_titlebar_height(void);
214 214
215void floating_calculate_constraints(int *min_width, int *max_width,
216 int *min_height, int *max_height);
217
215/** 218/**
216 * Resize and center the container in its workspace. 219 * Resize and center the container in its workspace.
217 */ 220 */