Module Name: src Committed By: nia Date: Sat May 8 14:49:14 UTC 2021
Modified Files: src/usr.bin/aiomixer: draw.c Log Message: aiomixer: bound the drawn area to the screen size, rather than replacing it To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/usr.bin/aiomixer/draw.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.bin/aiomixer/draw.c diff -u src/usr.bin/aiomixer/draw.c:1.5 src/usr.bin/aiomixer/draw.c:1.6 --- src/usr.bin/aiomixer/draw.c:1.5 Sat May 8 14:38:26 2021 +++ src/usr.bin/aiomixer/draw.c Sat May 8 14:49:13 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: draw.c,v 1.5 2021/05/08 14:38:26 nia Exp $ */ +/* $NetBSD: draw.c,v 1.6 2021/05/08 14:49:13 nia Exp $ */ /*- * Copyright (c) 2021 The NetBSD Foundation, Inc. * All rights reserved. @@ -134,10 +134,14 @@ draw_screen(struct aiomixer *aio) wnoutrefresh(stdscr); wnoutrefresh(aio->header); wnoutrefresh(aio->classbar); + max_y = aio->classes[aio->curclass].height + 1; + max_y -= aio->class_scroll_y; + if (max_y > (getmaxy(stdscr) - 3)) + max_y = getmaxy(stdscr) - 3; pnoutrefresh(aio->classes[aio->curclass].widgetpad, aio->class_scroll_y, 0, 3, 0, - getmaxy(stdscr) - 3, getmaxx(stdscr)); + max_y, getmaxx(stdscr)); doupdate(); }