Revert "[3.0] Modify iconify part for wayland"
[platform/core/uifw/dali-adaptor.git] / adaptors / ecore / wayland / window-render-surface-ecore-wl.cpp
index baf7cb9..da42e93 100644 (file)
@@ -50,7 +50,8 @@ WindowRenderSurface::WindowRenderSurface( Dali::PositionSize positionSize,
                                           const std::string& name,
                                           bool isTransparent)
 : EcoreWlRenderSurface( positionSize, surface, name, isTransparent ),
-  mEglWindow( NULL )
+  mEglWindow( NULL ),
+  mNeedToApproveDeiconify( false )
 {
   DALI_LOG_INFO( gRenderSurfaceLogFilter, Debug::Verbose, "Creating Window\n" );
   Init( surface );
@@ -87,6 +88,11 @@ Ecore_Wl_Window* WindowRenderSurface::GetWlWindow()
   return mWlWindow;
 }
 
+void WindowRenderSurface::RequestToApproveDeiconify()
+{
+  mNeedToApproveDeiconify = true;
+}
+
 void WindowRenderSurface::InitializeEgl( EglInterface& eglIf )
 {
   DALI_LOG_TRACE_METHOD( gRenderSurfaceLogFilter );
@@ -214,6 +220,17 @@ void WindowRenderSurface::PostRender( EglInterface& egl, Integration::GlAbstract
   {
     mRenderNotification->Trigger();
   }
+
+  // When the window is deiconified, it approves the deiconify operation to window manager after rendering
+  if(mNeedToApproveDeiconify)
+  {
+    // SwapBuffer is desychronized. So make sure to sychronize when window is deiconified.
+    glAbstraction.Finish();
+
+    //FIXME
+
+    mNeedToApproveDeiconify = false;
+  }
 }
 
 void WindowRenderSurface::StopRender()