[3.0] Support screen rotation
[platform/core/uifw/dali-adaptor.git] / adaptors / x11 / window-render-surface-x.cpp
index 2bc2f02..3230f88 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -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 );
@@ -180,13 +182,13 @@ void WindowRenderSurface::StartRender()
 {
 }
 
-bool WindowRenderSurface::PreRender( EglInterface&, Integration::GlAbstraction& )
+bool WindowRenderSurface::PreRender( EglInterface&, Integration::GlAbstraction&, bool )
 {
   // nothing to do for windows
   return true;
 }
 
-void WindowRenderSurface::PostRender( EglInterface& egl, Integration::GlAbstraction& glAbstraction, DisplayConnection* displayConnection, unsigned int deltaTime, bool replacingSurface )
+void WindowRenderSurface::PostRender( EglInterface& egl, Integration::GlAbstraction& glAbstraction, DisplayConnection* displayConnection, bool replacingSurface, bool resizingSurface )
 {
   Internal::Adaptor::EglImplementation& eglImpl = static_cast<Internal::Adaptor::EglImplementation&>( egl );
   eglImpl.SwapBuffers();
@@ -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;
@@ -294,6 +297,11 @@ void WindowRenderSurface::UseExistingRenderable( unsigned int surfaceId )
   mX11Window = static_cast< Ecore_X_Window >( surfaceId );
 }
 
+void WindowRenderSurface::SetThreadSynchronization( ThreadSynchronizationInterface& /* threadSynchronization */ )
+{
+  // Nothing to do.
+}
+
 void WindowRenderSurface::ReleaseLock()
 {
   // Nothing to do.