From: Max Kellermann Date: Sun, 4 Oct 2009 15:51:46 +0000 (+0200) Subject: screen: force repaint progress window in screen_paint() X-Git-Tag: release-0.16~166 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=71c696cd5fc03f46a0b3e28df1ec6596e570694a;p=ncmpc.git screen: force repaint progress window in screen_paint() --- diff --git a/src/screen.c b/src/screen.c index 1944170..c01c792 100644 --- a/src/screen.c +++ b/src/screen.c @@ -154,7 +154,7 @@ paint_top_window(const char *header, const struct mpdclient *c) } static void -paint_progress_window(struct mpdclient *c) +update_progress_window(struct mpdclient *c, bool repaint) { unsigned elapsed, duration; @@ -171,7 +171,8 @@ paint_progress_window(struct mpdclient *c) ? mpd_status_get_total_time(c->status) : 0; - if (progress_bar_set(&screen.progress_bar, elapsed, duration)) + if (progress_bar_set(&screen.progress_bar, elapsed, duration) || + repaint) progress_bar_paint(&screen.progress_bar); } @@ -342,7 +343,7 @@ screen_paint(struct mpdclient *c) /* paint the bottom window */ - paint_progress_window(c); + update_progress_window(c, true); status_bar_paint(&screen.status_bar, c->status, c->song); /* paint the main window */ @@ -440,7 +441,7 @@ screen_update(struct mpdclient *c) paint_top_window("", c); /* update progress window */ - paint_progress_window(c); + update_progress_window(c, false); /* update status window */ status_bar_paint(&screen.status_bar, c->status, c->song);