[4.0] Supports screen rotation.
[platform/core/uifw/dali-core.git] / dali / internal / common / core-impl.cpp
old mode 100644 (file)
new mode 100755 (executable)
index 7637a27..ae5a35a
@@ -196,6 +196,15 @@ void Core::SurfaceResized( unsigned int width, unsigned int height )
   mRelayoutController->SetStageSize( size.width, size.height );
 }
 
+void Core::SurfaceResized( unsigned int width, unsigned int height, int orientation )
+{
+  mStage->SurfaceResized( width, height, orientation );
+
+  // The stage-size may be less than surface-size (reduced by top-margin)
+  Vector2 size = mStage->GetSize();
+  mRelayoutController->SetStageSize( size.width, size.height );
+}
+
 void Core::SetTopMargin( unsigned int margin )
 {
   mStage->SetTopMargin( margin );
@@ -227,6 +236,9 @@ void Core::Update( float elapsedSeconds, unsigned int lastVSyncTimeMilliseconds,
   // Check the Notification Manager message queue to set needsNotification
   status.needsNotification = mNotificationManager->MessagesToProcess();
 
+  // Check if the default surface is changed
+  status.surfaceRectChanged = mUpdateManager->IsDefaultSurfaceRectChanged();
+
   // No need to keep update running if there are notifications to process.
   // Any message to update will wake it up anyways
 }