]> git.ipfire.org Git - thirdparty/newt.git/commitdiff
pay attention to isMapped
authorewt <ewt>
Mon, 2 Mar 1998 17:49:32 +0000 (17:49 +0000)
committerewt <ewt>
Mon, 2 Mar 1998 17:49:32 +0000 (17:49 +0000)
scrollbar.c

index ff2337c21a16ba3b9db7faff79a8f7edfe02f78c..47ac8140a22081beba308a66e0688fec32647dbd 100644 (file)
@@ -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);