Mercurial > hg
changeset 708:ed326697e4ed
scr_RosterVisibility(): do not refresh when it is not needed
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Tue, 21 Feb 2006 23:05:08 +0100 |
parents | b26a0bde4cdb |
children | 5aa66101807b |
files | mcabber/src/screen.c |
diffstat | 1 files changed, 7 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mcabber/src/screen.c Tue Feb 21 22:57:49 2006 +0100 +++ b/mcabber/src/screen.c Tue Feb 21 23:05:08 2006 +0100 @@ -857,6 +857,8 @@ // status=-1 Toggle roster status void scr_RosterVisibility(int status) { + int old_roster_status = roster_hidden; + if (status > 0) roster_hidden = FALSE; else if (status == 0) @@ -864,9 +866,11 @@ else roster_hidden = !roster_hidden; - // Recalculate windows size and redraw - scr_Resize(); - redrawwin(stdscr); + if (roster_hidden != old_roster_status) { + // Recalculate windows size and redraw + scr_Resize(); + redrawwin(stdscr); + } } inline void scr_WriteMessage(const char *jid, const char *text,