From owner-freebsd-bugs@FreeBSD.ORG Tue Aug 24 06:40:04 2010 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EA93C1065697 for ; Tue, 24 Aug 2010 06:40:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id C00648FC1F for ; Tue, 24 Aug 2010 06:40:04 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o7O6e45G050944 for ; Tue, 24 Aug 2010 06:40:04 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o7O6e4mj050943; Tue, 24 Aug 2010 06:40:04 GMT (envelope-from gnats) Date: Tue, 24 Aug 2010 06:40:04 GMT Message-Id: <201008240640.o7O6e4mj050943@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: dfilter@FreeBSD.ORG (dfilter service) Cc: Subject: Re: kern/148609: commit references a PR X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: dfilter service List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Aug 2010 06:40:05 -0000 The following reply was made to PR kern/148609; it has been noted by GNATS. From: dfilter@FreeBSD.ORG (dfilter service) To: bug-followup@FreeBSD.org Cc: Subject: Re: kern/148609: commit references a PR Date: Tue, 24 Aug 2010 06:31:12 +0000 (UTC) Author: imp Date: Tue Aug 24 06:30:46 2010 New Revision: 211731 URL: http://svn.freebsd.org/changeset/base/211731 Log: Create a checklist and call one of the *printw() functions from the selected() callback. When the dialog first appears, you will not see the printed statement on the dialog, if you move down one, you will, move up again and it now appears. I am assuming that you call a *printw() function on a line in the dialog box of course. The fix, from the pr: This is a hack at best, I looked at the redraw code in dialog_checklist() and took the minimal amount of it out to do a simple "refresh" right after the items are drawn. This doesn't hurt anything and makes the library work like it should. There is probably a better way however =). PR: 148609 Submitted by: John Hixson Modified: head/gnu/lib/libdialog/checklist.c Modified: head/gnu/lib/libdialog/checklist.c ============================================================================== --- head/gnu/lib/libdialog/checklist.c Tue Aug 24 06:11:46 2010 (r211730) +++ head/gnu/lib/libdialog/checklist.c Tue Aug 24 06:30:46 2010 (r211731) @@ -198,6 +198,24 @@ draw: wnoutrefresh(dialog); wmove(list, choice, check_x+1); wrefresh(list); + + /* + * XXX Black magic voodoo that allows printing to the checklist + * window. For some reason, if this "refresh" code is not in + * place, printing to the window from the selected callback + * prints "behind" the checklist window. There is probably a + * better way to do this. + */ + draw_box(dialog, box_y, box_x, list_height + 2, list_width + 2, menubox_border_attr, menubox_attr); + + for (i = 0; i < max_choice; i++) + print_item(list, items[i * 3], items[i * 3 + 1], status[i], i, i == choice, DREF(ditems, i), list_width, item_x, check_x); + print_arrows(dialog, scroll, list_height, item_no, box_x, box_y, check_x + 4, cur_x, cur_y); + + wmove(list, choice, check_x+1); + wnoutrefresh(dialog); + wrefresh(list); + /* XXX Black magic XXX */ while (key != ESC) { key = wgetch(dialog); _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"