diff options
author | okan | 2012-10-23 16:13:59 +0000 |
---|---|---|
committer | okan | 2012-10-23 16:13:59 +0000 |
commit | b37068222e35f734574ba34f124978067478fd45 (patch) | |
tree | f5e97eb6559f35a5544efcaac693e7fb93adc2bc /menu.c | |
parent | ee40d3a297552e8382afafefeba1d125004cc9c6 (diff) | |
download | cwm-b37068222e35f734574ba34f124978067478fd45.tar.gz |
comment what this whole bit does, not just part of it.
Diffstat (limited to '')
-rw-r--r-- | menu.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -16,7 +16,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $OpenBSD: menu.c,v 1.39 2012/10/23 16:08:59 okan Exp $ + * $OpenBSD: menu.c,v 1.40 2012/10/23 16:13:59 okan Exp $ */ #include <sys/param.h> @@ -359,16 +359,15 @@ menu_draw(struct screen_ctx *sc, struct menu_ctx *mc, struct menu_q *menuq, xsave = mc->x; ysave = mc->y; + /* Never hide the top, or left side, of the menu. */ if (mc->x + mc->width >= xmax) mc->x = xmax - mc->width; if (mc->x < xmin) { mc->x = xmin; mc->width = xmax - xmin; } - if (mc->y + mc->height >= ymax) mc->y = ymax - mc->height; - /* never hide the top of the menu */ if (mc->y < ymin) { mc->y = ymin; mc->height = ymax - ymin; |