From 434615a48f315a0655891149efa42dc6b919e722 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 25 Sep 2008 18:43:50 +0200 Subject: [PATCH] screen: don't pass screen pointer to method update() play_update() is the only update() implementation left, and it does not use the screen pointer. Remove it from the method signature. --- src/screen.c | 2 +- src/screen.h | 2 +- src/screen_play.c | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/screen.c b/src/screen.c index 785807c..e391a9d 100644 --- a/src/screen.c +++ b/src/screen.c @@ -706,7 +706,7 @@ screen_update(mpdclient_t *c) /* update the main window */ if (mode_fn->update != NULL) - mode_fn->update(&screen, c); + mode_fn->update(c); /* update progress window */ paint_progress_window(c); diff --git a/src/screen.h b/src/screen.h index 8c0a947..3ba5541 100644 --- a/src/screen.h +++ b/src/screen.h @@ -50,7 +50,7 @@ typedef void (*screen_open_fn_t)(struct screen *screen, mpdclient_t *c); typedef void (*screen_close_fn_t)(void); typedef void (*screen_resize_fn_t)(int cols, int rows); typedef void (*screen_paint_fn_t)(mpdclient_t *c); -typedef void (*screen_update_fn_t)(struct screen *screen, mpdclient_t *c); +typedef void (*screen_update_fn_t)(mpdclient_t *c); typedef int (*screen_cmd_fn_t)(struct screen *scr, mpdclient_t *c, command_t cmd); typedef const char *(*screen_title_fn_t)(char *s, size_t size); diff --git a/src/screen_play.c b/src/screen_play.c index 757ead3..8258e18 100644 --- a/src/screen_play.c +++ b/src/screen_play.c @@ -366,9 +366,11 @@ play_open(mpd_unused screen_t *screen, mpdclient_t *c) static gboolean install_cb = TRUE; assert(timer_hide_cursor_id == 0); - if (options.hide_cursor > 0) + if (options.hide_cursor > 0) { + lw->flags &= ~LW_HIDE_CURSOR; timer_hide_cursor_id = g_timeout_add(options.hide_cursor * 1000, timer_hide_cursor, c); + } if (install_cb) { mpdclient_install_playlist_callback(c, playlist_changed_callback); @@ -416,7 +418,7 @@ play_paint(mpdclient_t *c) } static void -play_update(mpd_unused screen_t *screen, mpdclient_t *c) +play_update(mpdclient_t *c) { /* center the cursor */ if (options.auto_center) { -- 2.30.2