aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKalle Wallin <kaw@linux.se>2004-07-21 11:40:42 +0000
committerKalle Wallin <kaw@linux.se>2004-07-21 11:40:42 +0000
commit41d25e22f8b3fabc954d5b58db6d1d36706aa418 (patch)
treefa8d5ec81e14cd53024d73ac9385b427c379bf86 /src
parentae9cb88ecc8ea1381d1480b17614e922dac1ac2d (diff)
downloadmpd-41d25e22f8b3fabc954d5b58db6d1d36706aa418.tar.gz
mpd-41d25e22f8b3fabc954d5b58db6d1d36706aa418.tar.xz
mpd-41d25e22f8b3fabc954d5b58db6d1d36706aa418.zip
Added debug code for #291
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1891 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src')
-rw-r--r--src/screen.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/screen.c b/src/screen.c
index 2e0bad8ee..e390720b8 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -114,6 +114,7 @@ switch_screen_mode(gint id, mpdclient_t *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;
}
@@ -579,10 +580,15 @@ screen_init(mpdclient_t *c)
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);