From 8439ca6f77e67971a4152a8dddad9e0b220718b5 Mon Sep 17 00:00:00 2001 From: Richard Huang Date: Thu, 25 Apr 2019 11:32:48 +0100 Subject: [PATCH] Only pause the adaptor when all the windows are hidden Change-Id: I757abc5e74a36869c68801adf144243313e8986b --- dali/internal/adaptor/common/adaptor-impl.cpp | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/dali/internal/adaptor/common/adaptor-impl.cpp b/dali/internal/adaptor/common/adaptor-impl.cpp index d36c352..d943263 100755 --- a/dali/internal/adaptor/common/adaptor-impl.cpp +++ b/dali/internal/adaptor/common/adaptor-impl.cpp @@ -859,10 +859,25 @@ void Adaptor::OnWindowHidden() { if ( RUNNING == mState ) { - Pause(); + bool allWindowsHidden = true; - // Adaptor cannot be resumed until the window is shown - mState = PAUSED_WHILE_HIDDEN; + for( WindowPtr window : mWindows ) + { + if ( window->IsVisible() ) + { + allWindowsHidden = false; + break; + } + } + + // Only pause the adaptor when all the windows are hidden + if ( allWindowsHidden ) + { + Pause(); + + // Adaptor cannot be resumed until any window is shown + mState = PAUSED_WHILE_HIDDEN; + } } else { -- 2.7.4