diff --git a/NEWS b/NEWS index c8767f15..447909d5 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,7 @@ ncmpc 0.45 - not yet released * make "tagtypes" errors non-fatal * check which tag types are supported by MPD (fixes MPD 0.21 support) +* lyrics: update page title after loading has finished * lyrics: fix path injection bug * lyrics: load cached lyrics without plugin * lyrics: use $XDG_CACHE_HOME/ncmpc/lyrics instead of ~/.lyrics diff --git a/src/LyricsPage.cxx b/src/LyricsPage.cxx index d0422d62..9045f15f 100644 --- a/src/LyricsPage.cxx +++ b/src/LyricsPage.cxx @@ -205,6 +205,9 @@ LyricsPage::OnPluginSuccess(const char *_plugin_name, plugin_timeout.Cancel(); StopPluginCycle(); + + /* schedule a full repaint so the page title gets updated */ + screen.SchedulePaint(); } void @@ -219,6 +222,9 @@ LyricsPage::OnPluginError(std::string error) noexcept plugin_timeout.Cancel(); StopPluginCycle(); + + /* schedule a full repaint so the page title gets updated */ + screen.SchedulePaint(); } void @@ -228,6 +234,9 @@ LyricsPage::OnTimeout() noexcept screen_status_printf(_("Lyrics timeout occurred after %d seconds"), (int)std::chrono::duration_cast(options.lyrics_timeout).count()); + + /* schedule a full repaint so the page title gets updated */ + screen.SchedulePaint(); } void diff --git a/src/screen.hxx b/src/screen.hxx index 3d672bdf..29e7d57b 100644 --- a/src/screen.hxx +++ b/src/screen.hxx @@ -146,13 +146,13 @@ public: Point p, mmask_t bstate); #endif -private: - void NextMode(struct mpdclient &c, int offset) noexcept; - void SchedulePaint() noexcept { paint_event.Schedule(); } +private: + void NextMode(struct mpdclient &c, int offset) noexcept; + void Paint() noexcept; };