status: fix seeking with visualizer visible
This commit is contained in:
@@ -208,7 +208,7 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// update timer, status if necessary etc.
|
// update timer, status if necessary etc.
|
||||||
Status::trace(!key_pressed);
|
Status::trace(!key_pressed, true);
|
||||||
|
|
||||||
if (run_resize_screen)
|
if (run_resize_screen)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -131,7 +131,7 @@ void Status::handleServerError(MPD::ServerError &e)
|
|||||||
|
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
void Status::trace(bool update_timer)
|
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();
|
||||||
@@ -149,12 +149,15 @@ void Status::trace(bool update_timer)
|
|||||||
applyToVisibleWindows(&BaseScreen::update);
|
applyToVisibleWindows(&BaseScreen::update);
|
||||||
Statusbar::tryRedraw();
|
Statusbar::tryRedraw();
|
||||||
|
|
||||||
// set appropriate window timeout
|
if (update_window_timeout)
|
||||||
int nc_wtimeout = std::numeric_limits<int>::max();
|
{
|
||||||
applyToVisibleWindows([&nc_wtimeout](BaseScreen *s) {
|
// set appropriate window timeout
|
||||||
nc_wtimeout = std::min(nc_wtimeout, s->windowTimeout());
|
int nc_wtimeout = std::numeric_limits<int>::max();
|
||||||
});
|
applyToVisibleWindows([&nc_wtimeout](BaseScreen *s) {
|
||||||
wFooter->setTimeout(nc_wtimeout);
|
nc_wtimeout = std::min(nc_wtimeout, s->windowTimeout());
|
||||||
|
});
|
||||||
|
wFooter->setTimeout(nc_wtimeout);
|
||||||
|
}
|
||||||
|
|
||||||
Mpd.idle();
|
Mpd.idle();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,8 +29,8 @@ namespace Status {//
|
|||||||
void handleClientError(MPD::ClientError &e);
|
void handleClientError(MPD::ClientError &e);
|
||||||
void handleServerError(MPD::ServerError &e);
|
void handleServerError(MPD::ServerError &e);
|
||||||
|
|
||||||
void trace(bool update_timer);
|
void trace(bool update_timer, bool update_window_timeout);
|
||||||
inline void trace() { trace(true); }
|
inline void trace() { trace(true, false); }
|
||||||
void update(int event);
|
void update(int event);
|
||||||
|
|
||||||
namespace State {//
|
namespace State {//
|
||||||
|
|||||||
Reference in New Issue
Block a user