summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: fd03c5b)
raw | patch | inline | side by side (parent: fd03c5b)
author | Max Kellermann <max@duempel.org> | |
Tue, 29 Sep 2009 21:17:23 +0000 (23:17 +0200) | ||
committer | Max Kellermann <max@duempel.org> | |
Tue, 29 Sep 2009 21:17:23 +0000 (23:17 +0200) |
When the playlist version changes, repaint the playlist screen. This
fixes a regression from the patch "repaint hscrolling only if selected
item is wide".
fixes a regression from the patch "repaint hscrolling only if selected
item is wide".
src/screen_play.c | patch | blob | history |
diff --git a/src/screen_play.c b/src/screen_play.c
index fbabe10714bc9a04084b6385afd10778bb14e0d5..3e4f05ada50ec563d0d993c1f32496d237930b96 100644 (file)
--- a/src/screen_play.c
+++ b/src/screen_play.c
#endif
static struct mpdclient_playlist *playlist;
+static unsigned visible_version = -1;
static int current_song_id = -1;
static list_window_t *lw = NULL;
static guint timer_hide_cursor_id;
wrefresh(lw->w);
}
-static void
-playlist_repaint_if_active(void)
-{
- if (screen_is_visible(&screen_playlist))
- playlist_repaint();
-}
-
static void
playlist_changed_callback(struct mpdclient *c, int event, gpointer data)
{
}
list_window_check_selected(lw, c->playlist.list->len);
- playlist_repaint_if_active();
}
#ifndef NCMPC_MINI
#endif
list_window_paint(lw, list_callback, NULL);
+
+ visible_version = playlist->id;
}
static void
enabled */
playlist_repaint();
#endif
+ } else if (visible_version != playlist->id) {
+ /* the playlist has changed, we must paint the new
+ version */
+ playlist_repaint();
}
}