diff options
Diffstat (limited to 'src/status.cpp')
-rw-r--r-- | src/status.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/status.cpp b/src/status.cpp index 5ee50b4a..6af5e621 100644 --- a/src/status.cpp +++ b/src/status.cpp @@ -209,15 +209,6 @@ void Status::trace(bool update_timer, bool update_window_timeout) { if (update_timer) Timer = boost::posix_time::microsec_clock::local_time(); - if (update_window_timeout) - { - // set appropriate window timeout - int nc_wtimeout = std::numeric_limits<int>::max(); - applyToVisibleWindows([&nc_wtimeout](BaseScreen *s) { - nc_wtimeout = std::min(nc_wtimeout, s->windowTimeout()); - }); - wFooter->setTimeout(nc_wtimeout); - } if (Mpd.Connected()) { if (!m_status_initialized) @@ -237,6 +228,16 @@ void Status::trace(bool update_timer, bool update_window_timeout) Mpd.idle(); } + // Update timeout after MPD as it may depend on its status. + if (update_window_timeout) + { + // set appropriate window timeout + int nc_wtimeout = std::numeric_limits<int>::max(); + applyToVisibleWindows([&nc_wtimeout](BaseScreen *s) { + nc_wtimeout = std::min(nc_wtimeout, s->windowTimeout()); + }); + wFooter->setTimeout(nc_wtimeout); + } } void Status::update(int event) |