From b939c8714d83efaab975f982164478aeb3b1eead Mon Sep 17 00:00:00 2001 From: suhyung Eom Date: Mon, 21 Nov 2016 13:06:22 +0900 Subject: [PATCH] [3.0] Implemented Window::SetClass() functionality in window-impl-ecore-wl.cpp Signed-off-by: suhyung Eom Change-Id: I6642bafffea6020b5a9aedd91190dfd6438497d4 --- adaptors/ecore/wayland/window-impl-ecore-wl.cpp | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/adaptors/ecore/wayland/window-impl-ecore-wl.cpp b/adaptors/ecore/wayland/window-impl-ecore-wl.cpp index 5849317..184299c 100644 --- a/adaptors/ecore/wayland/window-impl-ecore-wl.cpp +++ b/adaptors/ecore/wayland/window-impl-ecore-wl.cpp @@ -244,6 +244,18 @@ void Window::SetIndicatorBgOpacity( Dali::Window::IndicatorBgOpacity opacityMode void Window::SetClass(std::string name, std::string klass) { + ECore::WindowRenderSurface* wlSurface( dynamic_cast< ECore::WindowRenderSurface * >( mSurface ) ); + + if( wlSurface ) + { + Ecore_Wl_Window* wlWindow = wlSurface->GetWlWindow(); + ecore_wl_window_title_set( wlWindow, name.c_str() ); + ecore_wl_window_class_name_set( wlWindow, klass.c_str() ); + } + else + { + DALI_LOG_INFO( gWindowLogFilter, Debug::General, "Window has no surface\n" ); + } } Window::Window() @@ -291,15 +303,10 @@ void Window::Initialize(const PositionSize& windowPosition, const std::string& n // create an Wayland window by default Any surface; ECore::WindowRenderSurface* windowSurface = new ECore::WindowRenderSurface( windowPosition, surface, name, mIsTransparent ); - SetClass( name, className ); - windowSurface->Map(); mSurface = windowSurface; - - std::string appId; - mAdaptor->GetAppId( appId ); - Ecore_Wl_Window* wlWindow = windowSurface ->GetWlWindow(); - ecore_wl_window_class_name_set(wlWindow, appId.c_str()); + SetClass( name, className ); + windowSurface->Map(); mOrientation = Orientation::New(this); -- 2.7.4