summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 45b5541)
raw | patch | inline | side by side (parent: 45b5541)
author | Max Kellermann <max@duempel.org> | |
Sun, 21 Sep 2008 11:48:44 +0000 (13:48 +0200) | ||
committer | Max Kellermann <max@duempel.org> | |
Sun, 21 Sep 2008 11:48:44 +0000 (13:48 +0200) |
Why redraw the help screen when nothing has changed? Redraw it only
after help_cmd(), and when explicitly requested (help_paint()).
after help_cmd(), and when explicitly requested (help_paint()).
src/screen_help.c | patch | blob | history |
diff --git a/src/screen_help.c b/src/screen_help.c
index 07e3375fe5b4ffc4a272ff4aef773be9c468c114..7416e6e404f6a6dfcaaf5d35d646fe2ecbbf032d 100644 (file)
--- a/src/screen_help.c
+++ b/src/screen_help.c
wrefresh(lw->w);
}
-static void
-help_update(mpd_unused screen_t *screen, mpd_unused mpdclient_t *c)
-{
- if (lw->repaint) {
- list_window_paint(lw, list_callback, NULL);
- wrefresh(lw->w);
- lw->repaint = 0;
- }
-}
-
-
static int
help_cmd(screen_t *screen, mpd_unused mpdclient_t *c, command_t cmd)
{
- if (list_window_scroll_cmd(lw, help_text_rows, cmd))
+ if (list_window_scroll_cmd(lw, help_text_rows, cmd)) {
+ list_window_paint(lw, list_callback, NULL);
+ wrefresh(lw->w);
return 1;
+ }
lw->selected = lw->start+lw->rows;
if (screen_find(screen,
cmd, list_callback, NULL)) {
/* center the row */
list_window_center(lw, help_text_rows, lw->selected);
+ list_window_paint(lw, list_callback, NULL);
+ wrefresh(lw->w);
return 1;
}
.exit = help_exit,
.resize = help_resize,
.paint = help_paint,
- .update = help_update,
.cmd = help_cmd,
.get_title = help_title,
};