Merge "DALi Version 1.9.7" into devel/master
authorAdeel Kazmi <adeel.kazmi@samsung.com>
Thu, 9 Apr 2020 14:48:39 +0000 (14:48 +0000)
committerGerrit Code Review <gerrit@review>
Thu, 9 Apr 2020 14:48:39 +0000 (14:48 +0000)
dali/internal/window-system/ubuntu-x11/window-base-ecore-x.cpp
third-party/file.list
third-party/windows-platform/Win32File/CustomFile.cpp
third-party/windows-platform/Win32File/GetRealFileName.cpp [deleted file]

index 07d6ea4..ab67b43 100755 (executable)
@@ -20,6 +20,7 @@
 
 // INTERNAL HEADERS
 #include <dali/internal/window-system/common/window-impl.h>
+#include <dali/internal/window-system/common/window-system.h>
 #include <dali/internal/window-system/common/window-render-surface.h>
 #include <dali/internal/window-system/ubuntu-x11/ecore-x-types.h>
 
@@ -263,6 +264,8 @@ WindowBaseEcoreX::~WindowBaseEcoreX()
   if( mOwnSurface )
   {
     ecore_x_window_free( mEcoreWindow );
+
+    WindowSystem::Shutdown();
   }
 }
 
@@ -274,6 +277,8 @@ void WindowBaseEcoreX::Initialize( PositionSize positionSize, Any surface, bool
   // if the surface is empty, create a new one.
   if( surfaceId == 0 )
   {
+    WindowSystem::Initialize();
+
     // we own the surface about to created
     mOwnSurface = true;
     CreateWindow( positionSize, isTransparent );
index 56c0799..955fc9e 100644 (file)
@@ -1,13 +1,12 @@
 
 
 SET( static_libraries_glyphy_src_files
-  ${adaptor_thirdparty_dir}/glyphy/glyphy-arcs.cc 
-  ${adaptor_thirdparty_dir}/glyphy/glyphy-blob-impl.cc 
-  ${adaptor_thirdparty_dir}/glyphy/glyphy-extents.cc 
-  ${adaptor_thirdparty_dir}/glyphy/glyphy-outline.cc 
-  ${adaptor_thirdparty_dir}/glyphy/glyphy-sdf.cc 
+  ${adaptor_thirdparty_dir}/glyphy/glyphy-arcs.cc
+  ${adaptor_thirdparty_dir}/glyphy/glyphy-blob-impl.cc
+  ${adaptor_thirdparty_dir}/glyphy/glyphy-extents.cc
+  ${adaptor_thirdparty_dir}/glyphy/glyphy-outline.cc
+  ${adaptor_thirdparty_dir}/glyphy/glyphy-sdf.cc
   ${adaptor_thirdparty_dir}/glyphy/vector-font-cache.cpp
-  
 )
 
 
@@ -30,7 +29,6 @@ SET( adaptor_windows_platform_src_files
     ${adaptor_thirdparty_dir}/windows-platform/network.cpp
     ${adaptor_thirdparty_dir}/windows-platform/thread.cpp
     ${adaptor_thirdparty_dir}/windows-platform/Win32File/CustomFile.cpp
-    ${adaptor_thirdparty_dir}/windows-platform/Win32File/GetRealFileName.cpp
     ${adaptor_thirdparty_dir}/windows-platform/Win32File/MemFile.cpp
     ${adaptor_thirdparty_dir}/windows-platform/Win32File/OriginalFile.cpp
 )
\ No newline at end of file
index 5992bf7..1cfb627 100644 (file)
@@ -17,24 +17,39 @@ extern int OriginalFSeek( const void *fp, int offset, int origin );
 extern int OriginalFTell( const void *fp );
 extern bool OriginalFEof( const void *fp );
 
-namespace std
+namespace
 {
-int GetRealFileMode(const char *path, int _Mode)
+std::string GetRealName(const char* name)
 {
-  std::string strPath = path;
-
-  if ((std::ios::in | std::ios::ate == _Mode) && strPath.find(".json") != std::string::npos)
+  if (nullptr != name && '*' == name[0])
   {
-    return std::ios::in | std::ios::binary | std::ios::ate;
+    std::string envName;
+
+    const char *p = name + 1;
+
+    while (0 != *p && '*' != *p)
+    {
+      envName.push_back(*p);
+      p++;
+    }
+
+    p++;
+
+    char *envValue = std::getenv(envName.c_str());
+
+    std::string realName;
+    realName = "";
+    realName += envValue;
+    realName += p;
+
+    return realName;
   }
   else
   {
-    return _Mode;
+    return std::string(name);
   }
 }
-
-extern const char* GetRealName(const char *name);
-}
+} // namespace
 
 namespace CustomFile
 {
@@ -42,7 +57,7 @@ FILE* FOpen( const char *name, const char *mode )
 {
   if( NULL != name && '*' == name[0] )
   {
-    std::string realName = std::GetRealName( name );
+    std::string realName = GetRealName( name );
     FILE* ret = (FILE*)OriginalFOpen( realName.c_str(), mode );
     if (NULL == ret)
     {
diff --git a/third-party/windows-platform/Win32File/GetRealFileName.cpp b/third-party/windows-platform/Win32File/GetRealFileName.cpp
deleted file mode 100644 (file)
index 433a89c..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-#include <string>
-
-namespace std
-{
-const char* GetRealName( const char *name )
-{
-  if( NULL != name && '*' == name[0] )
-  {
-    string envName;
-
-    const char *p = name + 1;
-
-    while( 0 != *p && '*' != *p )
-    {
-      envName.push_back( *p );
-      p++;
-    }
-
-    p++;
-
-    char *envValue = std::getenv( envName.c_str() );
-
-    static std::string realName;
-    realName = "";
-    realName += envValue;
-    realName += p;
-
-    return realName.c_str();
-  }
-  else
-  {
-    return name;
-  }
-}
-}