aboutsummaryrefslogtreecommitdiff
path: root/sway
diff options
context:
space:
mode:
authortaiyu <taiyu.len@gmail.com>2015-09-07 15:22:15 -0700
committertaiyu <taiyu.len@gmail.com>2015-09-07 15:22:15 -0700
commit0de29d824741bd332e0e282612ef3f8e14f01f61 (patch)
treed25834575b6e7ffc35467834d170c9c4b067e9b7 /sway
parent7654f5e7cdbf5edff2f576a59cf04c530dd6efb5 (diff)
prevent views from disappearing
Diffstat (limited to 'sway')
-rw-r--r--sway/layout.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sway/layout.c b/sway/layout.c
index 18202cf2..bef1b88d 100644
--- a/sway/layout.c
+++ b/sway/layout.c
@@ -326,8 +326,10 @@ void update_geometry(swayc_t *container) {
.y = container->y + (container->is_floating ? 0 : gap / 2)
},
.size = {
- .w = container->width - (container->is_floating ? 0 : gap),
- .h = container->height - (container->is_floating ? 0 : gap)
+ .w = container->width > (container->is_floating ? 0 : gap) ?
+ container->width - (container->is_floating ? 0 : gap) : 0,
+ .h = container->height > (container->is_floating ? 0 : gap) ?
+ container->height - (container->is_floating ? 0 : gap) : 0,
}
};
if (swayc_is_fullscreen(container)) {