summaryrefslogtreecommitdiffstats
path: root/layout.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2018-09-24 17:02:38 +0100
committerThomas Adam <thomas@xteddy.org>2018-09-24 17:02:38 +0100
commit4799f43298a04f06081ae8b20f61b1830d415a99 (patch)
tree4a9b003db1c8d5b8ce5864ed422ce7cb807dbd4d /layout.c
parentad71e7f9d247e4745cf80c7ec6f698e959adb99f (diff)
parent7bc6c105b7565441e8b32f4f77099cb5c3274611 (diff)
Merge branch 'obsd-master'
Diffstat (limited to 'layout.c')
-rw-r--r--layout.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/layout.c b/layout.c
index c71dc7e5..89026b91 100644
--- a/layout.c
+++ b/layout.c
@@ -236,7 +236,7 @@ layout_need_status(struct layout_cell *lc, int at_top)
{
struct layout_cell *first_lc;
- if (lc->parent) {
+ if (lc->parent != NULL) {
if (lc->parent->type == LAYOUT_LEFTRIGHT)
return (layout_need_status(lc->parent, at_top));
@@ -307,7 +307,9 @@ layout_resize_check(struct window *w, struct layout_cell *lc,
{
struct layout_cell *lcchild;
u_int available, minimum;
+ int status;
+ status = options_get_number(w->options, "pane-border-status");
if (lc->type == LAYOUT_WINDOWPANE) {
/* Space available in this cell only. */
minimum = PANE_MINIMUM;
@@ -315,9 +317,8 @@ layout_resize_check(struct window *w, struct layout_cell *lc,
available = lc->sx;
else {
available = lc->sy;
- minimum += layout_need_status(lc,
- options_get_number(w->options,
- "pane-border-status") == 1);
+ if (status != 0)
+ minimum += layout_need_status(lc, status == 1);
}
if (available > minimum)
available -= minimum;