(Window) Update class-name at initialisation 07/43707/6
authorAdeel Kazmi <adeel.kazmi@samsung.com>
Mon, 13 Jul 2015 10:09:32 +0000 (11:09 +0100)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Mon, 13 Jul 2015 14:04:07 +0000 (07:04 -0700)
Change-Id: I71ad4d83c488c7b39731aa0d62434839662f454c

adaptors/x11/window-impl-x.cpp
adaptors/x11/window-render-surface-x.cpp
adaptors/x11/window-render-surface.h

index 05722cc..a460d8c 100644 (file)
@@ -375,8 +375,7 @@ void Window::Initialize(const PositionSize& windowPosition, const std::string& n
 {
   // create an X11 window by default
   Any surface;
-  ECore::WindowRenderSurface* windowSurface = new ECore::WindowRenderSurface( windowPosition, surface, name, mIsTransparent );
-  SetClass( name, className );
+  ECore::WindowRenderSurface* windowSurface = new ECore::WindowRenderSurface( windowPosition, surface, name, className, mIsTransparent );
   windowSurface->Map();
 
   mSurface = windowSurface;
index 2bc2f02..1f43521 100644 (file)
@@ -56,9 +56,11 @@ const int MINIMUM_DIMENSION_CHANGE( 1 ); ///< Minimum change for window to be co
 WindowRenderSurface::WindowRenderSurface( Dali::PositionSize positionSize,
                                           Any surface,
                                           const std::string& name,
+                                          const std::string& className,
                                           bool isTransparent)
 : EcoreXRenderSurface( positionSize, surface, name, isTransparent ),
-  mNeedToApproveDeiconify(false)
+  mNeedToApproveDeiconify(false),
+  mClassName(className)
 {
   DALI_LOG_INFO( gRenderSurfaceLogFilter, Debug::Verbose, "Creating Window\n" );
   Init( surface );
@@ -268,6 +270,7 @@ void WindowRenderSurface::CreateXRenderable()
   // set up window title which will be helpful for debug utitilty
   ecore_x_icccm_title_set( mX11Window, mTitle.c_str() );
   ecore_x_netwm_name_set( mX11Window, mTitle.c_str() );
+  ecore_x_icccm_name_class_set( mX11Window, mTitle.c_str(), mClassName.c_str() );
 
   // set up etc properties to match with ecore-evas
   char *id = NULL;
index 02b31bd..45c58ff 100644 (file)
@@ -40,11 +40,13 @@ public:
     * @param [in] positionSize the position and size of the surface
     * @param [in] surface can be a X-window or X-pixmap (type must be unsigned int).
     * @param [in] name optional name of surface passed in
+    * @param [in] className optional class name of the surface passed in
     * @param [in] isTransparent if it is true, surface has 32 bit color depth, otherwise, 24 bit
     */
   WindowRenderSurface( Dali::PositionSize positionSize,
                        Any surface,
                        const std::string& name,
+                       const std::string& className,
                        bool isTransparent = false );
 
   /**
@@ -153,6 +155,7 @@ private: // Data
 
   Ecore_X_Window   mX11Window; ///< X-Window
   bool             mNeedToApproveDeiconify; ///< Whether need to send ECORE_X_ATOM_E_DEICONIFY_APPROVE event
+  std::string      mClassName;          ///< The class name of the window
 
 }; // class WindowRenderSurface