From 2210a10c19e542a2c4d81372e6e0e171845e4c01 Mon Sep 17 00:00:00 2001 From: Adeel Kazmi Date: Mon, 13 Jul 2015 11:09:32 +0100 Subject: [PATCH] (Window) Update class-name at initialisation Change-Id: I71ad4d83c488c7b39731aa0d62434839662f454c --- adaptors/x11/window-impl-x.cpp | 3 +-- adaptors/x11/window-render-surface-x.cpp | 5 ++++- adaptors/x11/window-render-surface.h | 3 +++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/adaptors/x11/window-impl-x.cpp b/adaptors/x11/window-impl-x.cpp index 05722cc..a460d8c 100644 --- a/adaptors/x11/window-impl-x.cpp +++ b/adaptors/x11/window-impl-x.cpp @@ -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; diff --git a/adaptors/x11/window-render-surface-x.cpp b/adaptors/x11/window-render-surface-x.cpp index 2bc2f02..1f43521 100644 --- a/adaptors/x11/window-render-surface-x.cpp +++ b/adaptors/x11/window-render-surface-x.cpp @@ -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; diff --git a/adaptors/x11/window-render-surface.h b/adaptors/x11/window-render-surface.h index 02b31bd..45c58ff 100644 --- a/adaptors/x11/window-render-surface.h +++ b/adaptors/x11/window-render-surface.h @@ -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 -- 2.7.4