From d50894768e12b434092ba2fc8bb88b4d0b816ef8 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 20 Mar 2017 20:35:59 +0100 Subject: [PATCH] screen: rename screen_refresh() to screen_paint() --- src/main.c | 2 +- src/screen.c | 18 ++++++------------ src/screen.h | 5 ++++- 3 files changed, 11 insertions(+), 14 deletions(-) diff --git a/src/main.c b/src/main.c index 88660de..a5a803f 100644 --- a/src/main.c +++ b/src/main.c @@ -430,7 +430,7 @@ main(int argc, const char *argv[]) g_timeout_add_seconds(10, timer_check_key_bindings, NULL); #endif - screen_paint(mpd); + screen_paint(mpd, true); g_main_loop_run(main_loop); g_main_loop_unref(main_loop); diff --git a/src/screen.c b/src/screen.c index 1f7b7a6..a8c80bc 100644 --- a/src/screen.c +++ b/src/screen.c @@ -91,7 +91,7 @@ screen_switch(const struct screen_functions *sf, struct mpdclient *c) if (mode_fn->open != NULL) mode_fn->open(c); - screen_paint(c); + screen_paint(c, true); } void @@ -247,7 +247,7 @@ screen_resize(struct mpdclient *c) curs_set(1); curs_set(0); - screen_paint(c); + screen_paint(c, true); } #ifndef NCMPC_MINI @@ -326,8 +326,8 @@ screen_init(struct mpdclient *c) mode_fn->open(c); } -static void -screen_refresh(struct mpdclient *c, bool main_dirty) +void +screen_paint(struct mpdclient *c, bool main_dirty) { /* update title/header window */ paint_top_window(c); @@ -356,12 +356,6 @@ screen_refresh(struct mpdclient *c, bool main_dirty) doupdate(); } -void -screen_paint(struct mpdclient *c) -{ - screen_refresh(c, true); -} - void screen_update(struct mpdclient *c) { @@ -435,7 +429,7 @@ screen_update(struct mpdclient *c) if (mode_fn->update != NULL) mode_fn->update(c); - screen_refresh(c, false); + screen_paint(c, false); } #ifdef HAVE_GETMOUSE @@ -494,7 +488,7 @@ screen_cmd(struct mpdclient *c, command_t cmd) _("Auto center mode: Off")); break; case CMD_SCREEN_UPDATE: - screen_paint(c); + screen_paint(c, true); break; case CMD_SCREEN_PREVIOUS: screen_next_mode(c, -1); diff --git a/src/screen.h b/src/screen.h index ef766e5..3b6f724 100644 --- a/src/screen.h +++ b/src/screen.h @@ -63,7 +63,10 @@ extern struct screen screen; void screen_init(struct mpdclient *c); void screen_exit(void); void screen_resize(struct mpdclient *c); -void screen_paint(struct mpdclient *c); + +void +screen_paint(struct mpdclient *c, bool main_dirty); + void screen_update(struct mpdclient *c); void screen_cmd(struct mpdclient *c, command_t cmd); -- 2.30.2