summaryrefslogtreecommitdiffstats
path: root/cmd-display-menu.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2021-08-23 16:06:46 +0100
committerThomas Adam <thomas@xteddy.org>2021-08-23 16:06:46 +0100
commit95a374d7d20dde938563a9f92c8ffc1e25bd4050 (patch)
tree596cfdc4aa9c9d7a0f04cd1c8b541e86ede90eef /cmd-display-menu.c
parent1dec1ca146882572e261f2f2f55d9060c06a0212 (diff)
parent210e71edf36198e3f22525e7f548a71a5681d25c (diff)
Merge branch 'obsd-master' into master
Diffstat (limited to 'cmd-display-menu.c')
-rw-r--r--cmd-display-menu.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/cmd-display-menu.c b/cmd-display-menu.c
index da1ca994..06c62c5b 100644
--- a/cmd-display-menu.c
+++ b/cmd-display-menu.c
@@ -217,7 +217,7 @@ cmd_display_menu_get_position(struct client *tc, struct cmdq_item *item,
else if (n < 0)
n = 0;
*px = n;
- log_debug("%s: -x: %s = %s = %u", __func__, xp, p, *px);
+ log_debug("%s: -x: %s = %s = %u (-w %u)", __func__, xp, p, *px, w);
free(p);
/* Expand vertical position */
@@ -243,7 +243,7 @@ cmd_display_menu_get_position(struct client *tc, struct cmdq_item *item,
else if (n < 0)
n = 0;
*py = n;
- log_debug("%s: -y: %s = %s = %u", __func__, yp, p, *py);
+ log_debug("%s: -y: %s = %s = %u (-h %u)", __func__, yp, p, *py, h);
free(p);
return (1);
@@ -358,10 +358,10 @@ cmd_display_popup_exec(struct cmd *self, struct cmdq_item *item)
}
}
- if (w > tty->sx - 1)
- w = tty->sx - 1;
- if (h > tty->sy - 1)
- h = tty->sy - 1;
+ if (w > tty->sx)
+ w = tty->sx;
+ if (h > tty->sy)
+ h = tty->sy;
if (!cmd_display_menu_get_position(tc, item, args, &px, &py, w, h))
return (CMD_RETURN_NORMAL);