Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/aiomixer aiomixer: bound the drawn area to the scree...
details: https://anonhg.NetBSD.org/src/rev/57343db0e9f4
branches: trunk
changeset: 379079:57343db0e9f4
user: nia <nia%NetBSD.org@localhost>
date: Sat May 08 14:49:13 2021 +0000
description:
aiomixer: bound the drawn area to the screen size, rather than replacing it
diffstat:
usr.bin/aiomixer/draw.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diffs (25 lines):
diff -r d1e036b5ff59 -r 57343db0e9f4 usr.bin/aiomixer/draw.c
--- a/usr.bin/aiomixer/draw.c Sat May 08 14:38:26 2021 +0000
+++ b/usr.bin/aiomixer/draw.c Sat May 08 14:49:13 2021 +0000
@@ -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();
}
Home |
Main Index |
Thread Index |
Old Index