New window is set to the layout direction of tyhe default window. 37/242437/2
authorJoogab Yun <joogab.yun@samsung.com>
Thu, 27 Aug 2020 04:34:57 +0000 (13:34 +0900)
committerjoogab yun <joogab.yun@samsung.com>
Thu, 27 Aug 2020 04:25:36 +0000 (04:25 +0000)
Change-Id: Ic81ecf8134e77b002c7f8ebee1780242e8f8e61c

dali/internal/adaptor/common/adaptor-impl.cpp [changed mode: 0644->0755]
dali/internal/adaptor/common/adaptor-impl.h [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index 10a6180..5a65a8e
@@ -653,6 +653,9 @@ bool Adaptor::AddWindow( Dali::Integration::SceneHolder childWindow )
   Internal::Adaptor::SceneHolder& windowImpl = Dali::GetImplementation( childWindow );
   windowImpl.SetAdaptor( Get() );
 
+  // ChildWindow is set to the layout direction of the default window.
+  windowImpl.GetRootLayer().SetProperty( Dali::Actor::Property::LAYOUT_DIRECTION, mRootLayoutDirection );
+
   // Add the new Window to the container - the order is not important
   mWindows.push_back( &windowImpl );
 
@@ -1202,7 +1205,8 @@ Adaptor::Adaptor(Dali::Integration::SceneHolder window, Dali::Adaptor& adaptor,
   mSocketFactory(),
   mThreadMode( ThreadMode::NORMAL ),
   mEnvironmentOptionsOwned( environmentOptions ? false : true /* If not provided then we own the object */ ),
-  mUseRemoteSurface( false )
+  mUseRemoteSurface( false ),
+  mRootLayoutDirection( Dali::LayoutDirection::LEFT_TO_RIGHT )
 {
   DALI_ASSERT_ALWAYS( !IsAvailable() && "Cannot create more than one Adaptor per thread" );
   mWindows.insert( mWindows.begin(), &Dali::GetImplementation( window ) );
@@ -1212,11 +1216,11 @@ Adaptor::Adaptor(Dali::Integration::SceneHolder window, Dali::Adaptor& adaptor,
 
 void Adaptor::SetRootLayoutDirection( std::string locale )
 {
+  mRootLayoutDirection = static_cast< LayoutDirection::Type >( Internal::Adaptor::Locale::GetDirection( std::string( locale ) ) );
   for ( auto& window : mWindows )
   {
     Dali::Actor root = window->GetRootLayer();
-    root.SetProperty( Dali::Actor::Property::LAYOUT_DIRECTION,
-                      static_cast< LayoutDirection::Type >( Internal::Adaptor::Locale::GetDirection( std::string( locale ) ) ) );
+    root.SetProperty( Dali::Actor::Property::LAYOUT_DIRECTION, mRootLayoutDirection );
   }
 }
 
old mode 100644 (file)
new mode 100755 (executable)
index 2369d51..ec5c645
@@ -688,6 +688,7 @@ private: // Data
   ThreadMode                            mThreadMode;                  ///< The thread mode
   const bool                            mEnvironmentOptionsOwned:1;   ///< Whether we own the EnvironmentOptions (and thus, need to delete it)
   bool                                  mUseRemoteSurface:1;          ///< whether the remoteSurface is used or not
+  Dali::LayoutDirection::Type           mRootLayoutDirection;         ///< LayoutDirection of window
 
   std::unique_ptr<Integration::AddOnManager> mAddOnManager;           ///< Pointer to the addon manager