summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorOkan Demirmen <okan@cvs.openbsd.org>2012-10-23 16:14:00 +0000
committerOkan Demirmen <okan@cvs.openbsd.org>2012-10-23 16:14:00 +0000
commitcca0a41f4a0c808b3ba2504cbfced4ac7c02509c (patch)
treed4e63ffb808cf4507230f4ea96b9aaabe2d3e314 /app
parentd2e988e2c286722fc5f219ef859d5bae38c70ce4 (diff)
comment what this whole bit does, not just part of it.
Diffstat (limited to 'app')
-rw-r--r--app/cwm/menu.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/app/cwm/menu.c b/app/cwm/menu.c
index a52207709..fa44cfb74 100644
--- a/app/cwm/menu.c
+++ b/app/cwm/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.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;