summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xvchat-ui.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/vchat-ui.c b/vchat-ui.c
index e0f3def..9127211 100755
--- a/vchat-ui.c
+++ b/vchat-ui.c
@@ -343,7 +343,7 @@ int writepriv (unsigned char *str) {
343 fprintf( vchat_logfile, "%s1%s\n", date, str); 343 fprintf( vchat_logfile, "%s1%s\n", date, str);
344 } 344 }
345 345
346 if ( (sb_priv->scroll == sb_priv->scroll) && 346 if ( !privwinhidden && (sb_priv->scroll == sb_priv->scroll) &&
347 ((filtertype == 0) || ( testfilter(tmp)))) { 347 ((filtertype == 0) || ( testfilter(tmp)))) {
348 i = writescr(private, tmp); 348 i = writescr(private, tmp);
349 } 349 }
@@ -639,7 +639,7 @@ scrolldown (void)
639void 639void
640scrollwin (vod) 640scrollwin (vod)
641{ 641{
642 if (!sb_win && private) sb_win = 1; 642 if (!sb_win && private && !privwinhidden) sb_win = 1;
643 else sb_win = 0; 643 else sb_win = 0;
644 topicline(NULL); 644 topicline(NULL);
645 consoleline(NULL); 645 consoleline(NULL);
@@ -668,6 +668,8 @@ void toggleprivwin (vod) {
668 } else { 668 } else {
669 privwinhidden = privheight_desired; 669 privwinhidden = privheight_desired;
670 privheight_desired = 1; 670 privheight_desired = 1;
671 sb_win = 0;
672 sb_priv->scroll = sb_priv->count;
671 } 673 }
672 resize(0); 674 resize(0);
673 } 675 }
@@ -809,21 +811,24 @@ resize (int signal)
809 811
810 wresize(console,1,screensx); 812 wresize(console,1,screensx);
811 wresize(input,1,screensx); 813 wresize(input,1,screensx);
812 if (private) 814 if (private && !privwinhidden)
813 wresize(private,privheight,screensx); 815 wresize(private,privheight,screensx);
814 wresize(topic,1,screensx); 816 wresize(topic,1,screensx);
815 wresize(channel,screensy-(privheight+3),screensx); 817 wresize(channel, privwinhidden ? screensy - 3 : screensy - (privheight + 3), screensx);
816 818
817 mvwin(console,screensy-2,0); 819 mvwin(console,screensy-2,0);
818 mvwin(input,screensy-1,0); 820 mvwin(input,screensy-1,0);
819 if(private) mvwin(private,0,0); 821 if(private && !privwinhidden)
820 mvwin(topic,privheight,0); 822 mvwin(private,0,0);
821 mvwin(channel,privheight+1,0); 823 mvwin(topic,privwinhidden ? 0 : privheight, 0);
824 mvwin(channel,privwinhidden ? 1 : privheight + 1, 0);
822 825
823 drawwin(channel, sb_pub); 826 drawwin(channel, sb_pub);
824 if(private) drawwin(private, sb_priv); 827 if(private && !privwinhidden )
828 drawwin(private, sb_priv);
825 wnoutrefresh(channel); 829 wnoutrefresh(channel);
826 if(private) wnoutrefresh(private); 830 if(private && !privwinhidden )
831 wnoutrefresh(private);
827 832
828 if(outputshown) resize_output(); 833 if(outputshown) resize_output();
829 topicline(NULL); 834 topicline(NULL);