From 09a12c38ec71b646e92f30cc40cf5a468e018cb4 Mon Sep 17 00:00:00 2001 From: taeyoon Date: Wed, 4 Nov 2015 14:13:33 +0900 Subject: [PATCH] Set alpha to wayland window by Application::New(..., OPAQUE or Transparent) - Use ecore_wl_window_alpha_set() Change-Id: Ie5e978c9c87f64f81b1c31250c43c4cb62184f8f --- adaptors/wayland/window-render-surface-wl.cpp | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/adaptors/wayland/window-render-surface-wl.cpp b/adaptors/wayland/window-render-surface-wl.cpp index 38a2d44..d14dacc 100644 --- a/adaptors/wayland/window-render-surface-wl.cpp +++ b/adaptors/wayland/window-render-surface-wl.cpp @@ -101,6 +101,16 @@ void WindowRenderSurface::CreateEglSurface( EglInterface& eglIf ) Internal::Adaptor::EglImplementation& eglImpl = static_cast( eglIf ); + // Temporary code for opaque window. We have to modify it after wayland team finish the work. + if( mColorDepth == COLOR_DEPTH_32 ) + { + ecore_wl_window_alpha_set( mWlWindow, true ); + } + else + { + ecore_wl_window_alpha_set( mWlWindow, false ); + } + // create the EGL surface ecore_wl_window_surface_create(mWlWindow); mEglWindow = wl_egl_window_create(ecore_wl_window_surface_get(mWlWindow), mPosition.width, mPosition.height); @@ -121,7 +131,22 @@ bool WindowRenderSurface::ReplaceEGLSurface( EglInterface& egl ) { DALI_LOG_TRACE_METHOD( gRenderSurfaceLogFilter ); - wl_egl_window_destroy(mEglWindow); + if( mEglWindow != NULL ) + { + wl_egl_window_destroy(mEglWindow); + mEglWindow = NULL; + } + + // Temporary code for opaque window. We have to modify it after wayland team finish the work. + if( mColorDepth == COLOR_DEPTH_32 ) + { + ecore_wl_window_alpha_set( mWlWindow, true ); + } + else + { + ecore_wl_window_alpha_set( mWlWindow, false ); + } + mEglWindow = wl_egl_window_create(ecore_wl_window_surface_get(mWlWindow), mPosition.width, mPosition.height); Internal::Adaptor::EglImplementation& eglImpl = static_cast( egl ); -- 2.7.4