Fix Front buffer rendering does not activate when window created.
[platform/core/uifw/dali-adaptor.git] / dali / internal / window-system / common / window-impl.cpp
index dc0c18d..7c6ebfc 100644 (file)
@@ -23,7 +23,6 @@
 #include <dali/devel-api/events/key-event-devel.h>
 #include <dali/integration-api/core.h>
 #include <dali/integration-api/events/touch-event-integ.h>
-#include <dali/integration-api/events/touch-integ.h>
 #include <dali/public-api/actors/actor.h>
 #include <dali/public-api/actors/camera-actor.h>
 #include <dali/public-api/actors/layer.h>
@@ -68,6 +67,7 @@ Window* Window::New(Any surface, const std::string& name, const std::string& cla
 {
   Window* window         = new Window();
   window->mIsTransparent = windowData.GetTransparency();
+  window->mIsFrontBufferRendering = windowData.GetFrontBufferRendering();
   window->Initialize(surface, windowData.GetPositionSize(), name, className, windowData.GetWindowType());
   return window;
 }
@@ -98,7 +98,6 @@ Window::Window()
   mInsetsChangedSignal(),
   mPointerConstraintsSignal(),
   mLastKeyEvent(),
-  mLastTouchEvent(),
   mIsTransparent(false),
   mIsFocusAcceptable(true),
   mIconified(false),
@@ -108,7 +107,8 @@ Window::Window()
   mFocused(false),
   mIsWindowRotating(false),
   mIsEnabledUserGeometry(false),
-  mIsEmittedWindowCreatedEvent(false)
+  mIsEmittedWindowCreatedEvent(false),
+  mIsFrontBufferRendering(false)
 {
 }
 
@@ -211,6 +211,11 @@ void Window::Initialize(Any surface, const PositionSize& positionSize, const std
 
   // For Debugging
   mNativeWindowId = mWindowBase->GetNativeWindowId();
+
+  if(mIsFrontBufferRendering)
+  {
+    SetFrontBufferRendering(mIsFrontBufferRendering);
+  }
 }
 
 void Window::SetRenderNotification(TriggerEventInterface* renderNotification)
@@ -228,6 +233,12 @@ void Window::OnAdaptorSet(Dali::Adaptor& adaptor)
   mEventHandler = EventHandlerPtr(new EventHandler(mWindowSurface->GetWindowBase(), *mAdaptor));
   mEventHandler->AddObserver(*this);
 
+  if(mWindowBase->GetType() == WindowType::IME)
+  {
+    mWindowBase->InitializeIme();
+    mWindowSurface->InitializeImeSurface();
+  }
+
   // Add Window to bridge for ATSPI
   auto bridge = Accessibility::Bridge::GetCurrentBridge();
 
@@ -1061,7 +1072,6 @@ void Window::OnUpdatePositionSize(Dali::PositionSize& positionSize)
 
 void Window::OnTouchPoint(Dali::Integration::Point& point, int timeStamp)
 {
-  mLastTouchEvent = Dali::Integration::NewTouchEvent(timeStamp, point);
   FeedTouchPoint(point, timeStamp);
 }
 
@@ -1411,11 +1421,6 @@ const Dali::KeyEvent& Window::GetLastKeyEvent() const
   return mLastKeyEvent;
 }
 
-const Dali::TouchEvent& Window::GetLastTouchEvent() const
-{
-  return mLastTouchEvent;
-}
-
 void Window::SetUserGeometryPolicy()
 {
   if(mIsEnabledUserGeometry == true)
@@ -1468,6 +1473,27 @@ bool Window::KeyboardUnGrab()
   return mWindowBase->KeyboardUnGrab();
 }
 
+void Window::SetFullScreen(bool fullscreen)
+{
+  mWindowBase->SetFullScreen(fullscreen);
+}
+
+bool Window::GetFullScreen()
+{
+  return mWindowBase->GetFullScreen();
+}
+
+void Window::SetFrontBufferRendering(bool enable)
+{
+  mWindowBase->SetFrontBufferRendering(enable);
+  mWindowSurface->SetFrontBufferRendering(enable);
+}
+
+bool Window::GetFrontBufferRendering()
+{
+  return mWindowBase->GetFrontBufferRendering();
+}
+
 } // namespace Adaptor
 
 } // namespace Internal