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: do not adjust class widget pad he...



details:   https://anonhg.NetBSD.org/src/rev/d1e036b5ff59
branches:  trunk
changeset: 379078:d1e036b5ff59
user:      nia <nia%NetBSD.org@localhost>
date:      Sat May 08 14:38:26 2021 +0000

description:
aiomixer: do not adjust class widget pad height, draw to end of screen

ncurses refuses to paint pads if the height argument extends beyond
the bounds of the screen. it's probably not good for our curses either.

libcurses wresize() refuses to resize a pad beyond the bounds of the
screen even if it was created with a larger size. this is probably
a bug.

found by uwe

diffstat:

 usr.bin/aiomixer/draw.c |  10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diffs (32 lines):

diff -r 6f79b9d29540 -r d1e036b5ff59 usr.bin/aiomixer/draw.c
--- a/usr.bin/aiomixer/draw.c   Sat May 08 14:11:37 2021 +0000
+++ b/usr.bin/aiomixer/draw.c   Sat May 08 14:38:26 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: draw.c,v 1.4 2021/05/08 13:28:45 nia Exp $ */
+/* $NetBSD: draw.c,v 1.5 2021/05/08 14:38:26 nia Exp $ */
 /*-
  * Copyright (c) 2021 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -137,7 +137,7 @@ draw_screen(struct aiomixer *aio)
        pnoutrefresh(aio->classes[aio->curclass].widgetpad,
            aio->class_scroll_y, 0,
            3, 0,
-           1 + aio->classes[aio->curclass].height, getmaxx(stdscr));
+           getmaxy(stdscr) - 3, getmaxx(stdscr));
        doupdate();
 }
 
@@ -360,7 +360,13 @@ create_widgets(struct aiomixer *aio)
                        control->widget_y = class->height;
                        class->height += control->height;
                }
+#ifdef notyet
+               /*
+                * NetBSD curses wresize() bounds the pad to the height of
+                * the screen even though it's already taller. Probably a bug.
+                */
                wresize(class->widgetpad, class->height, getmaxx(stdscr));
+#endif
        }
 
        aio->last_max_x = getmaxx(stdscr);



Home | Main Index | Thread Index | Old Index