From a8276c41c34ed0321ddcc9e41623be830fde0a30 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Tue, 27 Sep 2022 22:31:53 +0200 Subject: [PATCH] Allow checking whether View was active. Currently this only checks if client connection is active. --- server/TracyView.cpp | 5 +++++ server/TracyView.hpp | 1 + 2 files changed, 6 insertions(+) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index ca9e33dd..af14f3cd 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -1288,4 +1288,9 @@ void View::HighlightThread( uint64_t thread ) m_drawThreadHighlight = thread; } +bool View::WasActive() const +{ + return m_worker.IsConnected(); +} + } diff --git a/server/TracyView.hpp b/server/TracyView.hpp index 0be47b75..6567d570 100644 --- a/server/TracyView.hpp +++ b/server/TracyView.hpp @@ -96,6 +96,7 @@ public: ~View(); static bool Draw(); + bool WasActive() const; void NotifyRootWindowSize( float w, float h ) { m_rootWidth = w; m_rootHeight = h; } void ViewSource( const char* fileName, int line );