[4.0] Create Widget Application
[platform/core/uifw/dali-adaptor.git] / adaptors / common / adaptor-impl.cpp
index 47512c7..1f8d21a 100644 (file)
@@ -93,6 +93,8 @@ Dali::Adaptor* Adaptor::New( Dali::Window window, Dali::Configuration::ContextLo
 
   Window& windowImpl = Dali::GetImplementation(window);
   Dali::Adaptor* adaptor = New( winId, windowImpl.GetSurface(), configuration, environmentOptions );
+
+  Internal::Adaptor::Adaptor::GetImplementation( *adaptor ).SetWindow( window );
   windowImpl.SetAdaptor(*adaptor);
   return adaptor;
 }
@@ -809,6 +811,7 @@ Adaptor::Adaptor(Any nativeWindow, Dali::Adaptor& adaptor, RenderSurface* surfac
   mTriggerEventFactory(),
   mObjectProfiler( NULL ),
   mSocketFactory(),
+  mWindow(),
   mEnvironmentOptionsOwned( environmentOptions ? false : true /* If not provided then we own the object */ ),
   mUseRemoteSurface( false )
 {
@@ -847,6 +850,16 @@ void Adaptor::SetRootLayoutDirection( std::string locale )
                                     static_cast< LayoutDirection::Type >( Internal::Adaptor::Locale::GetDirection( std::string( locale ) ) ) );
 }
 
+void Adaptor::SetWindow( Dali::Window window )
+{
+  mWindow = window;
+}
+
+Dali::Window Adaptor::GetWindow()
+{
+  return mWindow;
+}
+
 } // namespace Adaptor
 
 } // namespace Internal