From 1aee8f1f4d20cdc60b110320bd09e0dd1ce4c257 Mon Sep 17 00:00:00 2001 From: Brad Davis Date: Tue, 18 Jul 2017 13:44:58 -0700 Subject: [PATCH] Ensure we continue calling idle when minimized --- interface/src/Application.cpp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index e8a4a039eb..dbb94cfdae 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -2751,6 +2751,16 @@ bool Application::event(QEvent* event) { static_cast(event)->call(); return true; + // Explicit idle keeps the idle running at a lower interval, but without any rendering + // see (windowMinimizedChanged) + case Event::Idle: + { + float nsecsElapsed = (float)_lastTimeUpdated.nsecsElapsed(); + _lastTimeUpdated.start(); + idle(nsecsElapsed); + } + return true; + case Event::Present: if (!_renderRequested) { float nsecsElapsed = (float)_lastTimeUpdated.nsecsElapsed(); @@ -5439,9 +5449,9 @@ void Application::updateWindowTitle() const { #endif _window->setWindowTitle(title); - // updateTitleWindow gets called whenever there's a change regarding the domain, so rather - // than placing this within domainChanged, it's placed here to cover the other potential cases. - DependencyManager::get< MessagesClient >()->sendLocalMessage("Toolbar-DomainChanged", ""); + // updateTitleWindow gets called whenever there's a change regarding the domain, so rather + // than placing this within domainChanged, it's placed here to cover the other potential cases. + DependencyManager::get< MessagesClient >()->sendLocalMessage("Toolbar-DomainChanged", ""); } void Application::clearDomainOctreeDetails() {