summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: dea6351)
raw | patch | inline | side by side (parent: dea6351)
author | Max Kellermann <max@duempel.org> | |
Thu, 25 Sep 2008 15:42:55 +0000 (17:42 +0200) | ||
committer | Max Kellermann <max@duempel.org> | |
Thu, 25 Sep 2008 15:42:55 +0000 (17:42 +0200) |
Automatically redraw the screen on demand, whenever data has changed.
src/screen_lyrics.c | patch | blob | history |
diff --git a/src/screen_lyrics.c b/src/screen_lyrics.c
index a039c3859e4df42ccfbe3932283029055e4cde2c..d83bf5b36b993d9acfdca8cd8d2356aa8f3873d5 100644 (file)
--- a/src/screen_lyrics.c
+++ b/src/screen_lyrics.c
list_window_paint(lw, list_callback, NULL);
}
-
-static void
-lyrics_update(mpd_unused screen_t *screen, mpd_unused mpdclient_t *c)
-{
- if( lw->repaint ) {
- list_window_paint(lw, list_callback, NULL);
- lw->repaint = 0;
- }
-}
-
-
static int
lyrics_cmd(screen_t *screen, mpdclient_t *c, command_t cmd)
{
- if (list_window_scroll_cmd(lw, current.lines->len, cmd))
+ if (list_window_scroll_cmd(lw, current.lines->len, cmd)) {
+ lyrics_repaint();
return 1;
+ }
switch(cmd) {
case CMD_INTERRUPT:
cmd, list_callback, NULL)) {
/* center the row */
list_window_center(lw, current.lines->len, lw->selected);
+ lyrics_repaint();
return 1;
}
.close = NULL,
.resize = lyrics_resize,
.paint = lyrics_paint,
- .update = lyrics_update,
.cmd = lyrics_cmd,
.get_title = lyrics_title,
};