mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
treat menu width the same as the height is treated when deciding its
max size and location; partially from a diff from Alexander Polakov.
This commit is contained in:
parent
c21d56e5a1
commit
637c52abf8
8
menu.c
8
menu.c
@ -358,10 +358,12 @@ menu_draw(struct screen_ctx *sc, struct menu_ctx *mc, struct menu_q *menuq,
|
|||||||
xsave = mc->x;
|
xsave = mc->x;
|
||||||
ysave = mc->y;
|
ysave = mc->y;
|
||||||
|
|
||||||
if (mc->x < xmin)
|
if (mc->x + mc->width >= xmax)
|
||||||
mc->x = xmin;
|
|
||||||
else if (mc->x + mc->width >= xmax)
|
|
||||||
mc->x = xmax - mc->width;
|
mc->x = xmax - mc->width;
|
||||||
|
if (mc->x < xmin) {
|
||||||
|
mc->x = xmin;
|
||||||
|
mc->width = xmax - xmin;
|
||||||
|
}
|
||||||
|
|
||||||
if (mc->y + dy >= ymax)
|
if (mc->y + dy >= ymax)
|
||||||
mc->y = ymax - dy;
|
mc->y = ymax - dy;
|
||||||
|
Loading…
Reference in New Issue
Block a user