From 8117d7d4d45546dfe08f78f46649b2b17283d58e Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Wed, 28 Sep 2022 01:01:22 +0200 Subject: [PATCH] Mark activity when buzz anim is enabled. --- server/TracyView.cpp | 20 +++++++++++--------- server/TracyView.hpp | 1 + 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 5660557d..ccff2dfd 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -629,6 +629,7 @@ bool View::DrawImpl() } const auto& io = ImGui::GetIO(); + m_wasActive = false; assert( m_shortcut == ShortcutAction::None ); if( io.KeyCtrl ) @@ -1069,14 +1070,14 @@ bool View::DrawImpl() } } - m_callstackBuzzAnim.Update( io.DeltaTime ); - m_sampleParentBuzzAnim.Update( io.DeltaTime ); - m_callstackTreeBuzzAnim.Update( io.DeltaTime ); - m_zoneinfoBuzzAnim.Update( io.DeltaTime ); - m_findZoneBuzzAnim.Update( io.DeltaTime ); - m_optionsLockBuzzAnim.Update( io.DeltaTime ); - m_lockInfoAnim.Update( io.DeltaTime ); - m_statBuzzAnim.Update( io.DeltaTime ); + m_wasActive |= m_callstackBuzzAnim.Update( io.DeltaTime ); + m_wasActive |= m_sampleParentBuzzAnim.Update( io.DeltaTime ); + m_wasActive |= m_callstackTreeBuzzAnim.Update( io.DeltaTime ); + m_wasActive |= m_zoneinfoBuzzAnim.Update( io.DeltaTime ); + m_wasActive |= m_findZoneBuzzAnim.Update( io.DeltaTime ); + m_wasActive |= m_optionsLockBuzzAnim.Update( io.DeltaTime ); + m_wasActive |= m_lockInfoAnim.Update( io.DeltaTime ); + m_wasActive |= m_statBuzzAnim.Update( io.DeltaTime ); if( m_firstFrame ) { @@ -1290,7 +1291,8 @@ void View::HighlightThread( uint64_t thread ) bool View::WasActive() const { - return m_zoomAnim.active || + return m_wasActive || + m_zoomAnim.active || m_notificationTime > 0 || m_worker.IsConnected() || !m_worker.IsBackgroundDone(); diff --git a/server/TracyView.hpp b/server/TracyView.hpp index 6567d570..85285cee 100644 --- a/server/TracyView.hpp +++ b/server/TracyView.hpp @@ -555,6 +555,7 @@ private: std::vector> m_annotations; UserData m_userData; + bool m_wasActive = false; bool m_reconnectRequested = false; bool m_firstFrame = true; std::chrono::time_point m_firstFrameTime;