status: always update window timeout
This commit is contained in:
@@ -191,6 +191,15 @@ void Status::trace(bool update_timer, bool update_window_timeout)
|
|||||||
{
|
{
|
||||||
if (update_timer)
|
if (update_timer)
|
||||||
Timer = boost::posix_time::microsec_clock::local_time();
|
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 (Mpd.Connected())
|
||||||
{
|
{
|
||||||
if (!m_status_initialized)
|
if (!m_status_initialized)
|
||||||
@@ -208,16 +217,6 @@ void Status::trace(bool update_timer, bool update_window_timeout)
|
|||||||
applyToVisibleWindows(&BaseScreen::update);
|
applyToVisibleWindows(&BaseScreen::update);
|
||||||
Statusbar::tryRedraw();
|
Statusbar::tryRedraw();
|
||||||
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
Mpd.idle();
|
Mpd.idle();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user