summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8e421ef)
raw | patch | inline | side by side (parent: 8e421ef)
author | Max Kellermann <max.kellermann@gmail.com> | |
Mon, 20 Mar 2017 19:35:59 +0000 (20:35 +0100) | ||
committer | Max Kellermann <max.kellermann@gmail.com> | |
Mon, 20 Mar 2017 19:35:59 +0000 (20:35 +0100) |
src/main.c | patch | blob | history | |
src/screen.c | patch | blob | history | |
src/screen.h | patch | blob | history |
diff --git a/src/main.c b/src/main.c
index 88660de05842e12fc4258c58da3a45f13547bb70..a5a803f04104163562c514ffa88e9ab7281e2d44 100644 (file)
--- a/src/main.c
+++ b/src/main.c
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 1f7b7a6ef69f7a028a837da5442699c41d51f5bc..a8c80bcee3897f0603fe6f934444af06798cdc50 100644 (file)
--- a/src/screen.c
+++ b/src/screen.c
if (mode_fn->open != NULL)
mode_fn->open(c);
- screen_paint(c);
+ screen_paint(c, true);
}
void
curs_set(1);
curs_set(0);
- screen_paint(c);
+ screen_paint(c, true);
}
#ifndef NCMPC_MINI
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);
doupdate();
}
-void
-screen_paint(struct mpdclient *c)
-{
- screen_refresh(c, true);
-}
-
void
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
_("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 ef766e58a79b106067b84a714f2818f2b58c54cd..3b6f7247a0db467043e3f25d91e052f6ab68e5a2 100644 (file)
--- a/src/screen.h
+++ b/src/screen.h
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);