Allow checking whether View was active.

Currently this only checks if client connection is active.
This commit is contained in:
Bartosz Taudul 2022-09-27 22:31:53 +02:00
parent a8be0bc91e
commit a8276c41c3
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3
2 changed files with 6 additions and 0 deletions

View File

@ -1288,4 +1288,9 @@ void View::HighlightThread( uint64_t thread )
m_drawThreadHighlight = thread; m_drawThreadHighlight = thread;
} }
bool View::WasActive() const
{
return m_worker.IsConnected();
}
} }

View File

@ -96,6 +96,7 @@ public:
~View(); ~View();
static bool Draw(); static bool Draw();
bool WasActive() const;
void NotifyRootWindowSize( float w, float h ) { m_rootWidth = w; m_rootHeight = h; } void NotifyRootWindowSize( float w, float h ) { m_rootWidth = w; m_rootHeight = h; }
void ViewSource( const char* fileName, int line ); void ViewSource( const char* fileName, int line );