From bc9a040b94798d093048c2152dd03804c41e6268 Mon Sep 17 00:00:00 2001 From: okan Date: Wed, 2 Jan 2013 02:19:20 +0000 Subject: more variable consistency --- menu.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'menu.c') diff --git a/menu.c b/menu.c index 261e481..e49c675 100644 --- a/menu.c +++ b/menu.c @@ -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.48 2012/12/17 14:32:39 okan Exp $ + * $OpenBSD: menu.c,v 1.49 2013/01/02 02:19:20 okan Exp $ */ #include @@ -351,7 +351,7 @@ menu_draw(struct screen_ctx *sc, struct menu_ctx *mc, struct menu_q *menuq, { struct menu *mi; XineramaScreenInfo *xine; - int xmin, xmax, ymin, ymax; + int x_org, y_org, xmax, ymax; int n, xsave, ysave; if (mc->list) { @@ -396,12 +396,12 @@ menu_draw(struct screen_ctx *sc, struct menu_ctx *mc, struct menu_q *menuq, xine = screen_find_xinerama(sc, mc->x, mc->y); if (xine) { - xmin = xine->x_org; + x_org = xine->x_org; + y_org = xine->y_org; xmax = xine->x_org + xine->width; - ymin = xine->y_org; ymax = xine->y_org + xine->height; } else { - xmin = ymin = 0; + x_org = y_org = 0; xmax = sc->view.w; ymax = sc->view.h; } @@ -412,15 +412,15 @@ menu_draw(struct screen_ctx *sc, struct menu_ctx *mc, struct menu_q *menuq, /* 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->x < x_org) { + mc->x = x_org; + mc->width = xmax - x_org; } if (mc->y + mc->height >= ymax) mc->y = ymax - mc->height; - if (mc->y < ymin) { - mc->y = ymin; - mc->height = ymax - ymin; + if (mc->y < y_org) { + mc->y = y_org; + mc->height = ymax - y_org; } if (mc->x != xsave || mc->y != ysave) -- cgit v1.2.3-2-gb3c3