mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
comment what this whole bit does, not just part of it.
This commit is contained in:
parent
710347df1b
commit
742bcec522
3
menu.c
3
menu.c
@ -359,16 +359,15 @@ 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;
|
||||||
|
|
||||||
|
/* Never hide the top, or left side, of the menu. */
|
||||||
if (mc->x + mc->width >= xmax)
|
if (mc->x + mc->width >= xmax)
|
||||||
mc->x = xmax - mc->width;
|
mc->x = xmax - mc->width;
|
||||||
if (mc->x < xmin) {
|
if (mc->x < xmin) {
|
||||||
mc->x = xmin;
|
mc->x = xmin;
|
||||||
mc->width = xmax - xmin;
|
mc->width = xmax - xmin;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mc->y + mc->height >= ymax)
|
if (mc->y + mc->height >= ymax)
|
||||||
mc->y = ymax - mc->height;
|
mc->y = ymax - mc->height;
|
||||||
/* never hide the top of the menu */
|
|
||||||
if (mc->y < ymin) {
|
if (mc->y < ymin) {
|
||||||
mc->y = ymin;
|
mc->y = ymin;
|
||||||
mc->height = ymax - ymin;
|
mc->height = ymax - ymin;
|
||||||
|
Loading…
Reference in New Issue
Block a user