summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ae9cb88)
raw | patch | inline | side by side (parent: ae9cb88)
author | Kalle Wallin <kaw@linux.se> | |
Wed, 21 Jul 2004 11:40:42 +0000 (11:40 +0000) | ||
committer | Kalle Wallin <kaw@linux.se> | |
Wed, 21 Jul 2004 11:40:42 +0000 (11:40 +0000) |
src/screen.c | patch | blob | history |
diff --git a/src/screen.c b/src/screen.c
index 2e0bad8eee4a8b6df69474b0dc959c00a14dbbbc..e390720b83df2ca41269924514fb0cb6393dcf0f 100644 (file)
--- a/src/screen.c
+++ b/src/screen.c
new_mode = lookup_mode(id);
if( new_mode>=0 && screens[new_mode].get_mode_functions )
{
+ D("switch_screen(%s)\n", screens[new_mode].name );
mode_fn = screens[new_mode].get_mode_functions();
screen->mode = new_mode;
}
void
screen_paint(mpdclient_t *c)
{
- D("screen_paint()\n");
- /* paint the title/header window */
+ char *title = NULL;
+
if( mode_fn && mode_fn->get_title )
- paint_top_window(mode_fn->get_title(screen->buf,screen->buf_size), c, 1);
+ title = mode_fn->get_title(screen->buf,screen->buf_size);
+
+ D("screen_paint(%s)\n", title);
+ /* paint the title/header window */
+ if( title )
+ paint_top_window(title, c, 1);
else
paint_top_window("", c, 1);