Check for activity in View.

This commit is contained in:
Bartosz Taudul 2022-09-28 00:26:03 +02:00
parent a8276c41c3
commit b3e9a03856
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -271,15 +271,22 @@ static void DrawContents()
bptr->NewFrame( display_w, display_h );
static int activeFrames = 3;
auto& inputQueue = ImGui::GetCurrentContext()->InputEventsQueue;
if( !inputQueue.empty() )
if( view && view->WasActive() )
{
for( auto& v : inputQueue )
activeFrames = 3;
}
else
{
auto& inputQueue = ImGui::GetCurrentContext()->InputEventsQueue;
if( !inputQueue.empty() )
{
if( v.Type != ImGuiInputEventType_MouseViewport )
for( auto& v : inputQueue )
{
activeFrames = 3;
break;
if( v.Type != ImGuiInputEventType_MouseViewport )
{
activeFrames = 3;
break;
}
}
}
}