Change to process events when the application is paused
[platform/core/uifw/dali-core.git] / dali / internal / event / size-negotiation / relayout-controller-impl.cpp
index e380a7e..4e468f4 100644 (file)
@@ -31,6 +31,7 @@
 #include <dali/public-api/object/object-registry.h>
 #include <dali/internal/event/actors/actor-impl.h>
 #include <dali/internal/event/common/stage-impl.h>
+#include <dali/internal/event/common/system-overlay-impl.h>
 #include <dali/internal/event/common/thread-local-storage.h>
 
 namespace Dali
@@ -198,7 +199,7 @@ void RelayoutController::RequestRelayout( Dali::Actor& actor, Dimension::Type di
 
   if ( !mProcessingCoreEvents )
   {
-    mRenderController.RequestProcessEventsOnIdle();
+    mRenderController.RequestProcessEventsOnIdle( false );
   }
 }
 
@@ -211,9 +212,19 @@ void RelayoutController::OnApplicationSceneCreated()
 
   // Spread the dirty flag through whole tree - don't need to explicity
   // add request on rootLayer as it will automatically be added below.
-  Dali::Actor rootLayer = Dali::Stage::GetCurrent().GetRootLayer();
+  Dali::Stage stage = Dali::Stage::GetCurrent();
+  Dali::Actor rootLayer = stage.GetRootLayer();
   RequestRelayoutTree( rootLayer );
 
+  // Also add request on the root of system overlay
+  Dali::Internal::SystemOverlay* systemOverlay = GetImplementation(stage).GetSystemOverlayInternal();
+  if( systemOverlay )
+  {
+    Dali::Internal::Actor& systemOverlayInternalRoot = systemOverlay->GetDefaultRootActor();
+    Dali::Actor systemOverlayRoot = Dali::Actor(&systemOverlayInternalRoot);
+    RequestRelayoutTree( systemOverlayRoot );
+  }
+
   // Flag request for end of frame
   Request();
 }
@@ -481,6 +492,9 @@ void RelayoutController::Relayout()
           //    has to fill with all the actors it has not done any size negotiation for.
 
           actorImpl.NegotiateSize( size, *mRelayoutStack );
+
+          // Reset the flag so that size negotiation will respect the actor's original resize policy
+          actorImpl.SetUseAssignedSize( false );
         }
       }