From: ewt Date: Mon, 2 Mar 1998 17:49:32 +0000 (+0000) Subject: pay attention to isMapped X-Git-Tag: r0-22~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=11e3bf5e830a26d5ba28dd9b23bdc83559a33e9c;p=thirdparty%2Fnewt.git pay attention to isMapped --- diff --git a/scrollbar.c b/scrollbar.c index ff2337c..47ac814 100644 --- a/scrollbar.c +++ b/scrollbar.c @@ -47,6 +47,7 @@ newtComponent newtVerticalScrollbar(int left, int top, int height, sb->csThumb = thumbColorset; co->ops = &sbOps; + co->isMapped = 0; co->left = left; co->top = top; co->height = height; @@ -60,6 +61,8 @@ static void sbDraw(newtComponent co) { struct scrollbar * sb = co->data; int i; + if (!co->isMapped) return; + SLsmg_set_color(sb->cs); SLsmg_set_char_set(1); @@ -77,6 +80,8 @@ static void sbDrawThumb(newtComponent co, int isOn) { struct scrollbar * sb = co->data; char ch = isOn ? '#' : '\x61'; + if (!co->isMapped) return; + newtGotorc(sb->curr + co->top, co->left); SLsmg_set_char_set(1);