From ba01bd59e55015739ab9612a261269a21e66b68e Mon Sep 17 00:00:00 2001 From: Daekwang Ryu Date: Tue, 26 Apr 2022 10:47:23 +0900 Subject: [PATCH] [Tizen] Add to get the status whether window is rotating or not This reverts commit caf1239ea6ef32ac28e3d370ab8b8322c1d6953e. Change-Id: I35ca2bb08be37ead500276472dd8399f77b8f5ac --- dali/devel-api/adaptor-framework/window-devel.cpp | 5 +++++ dali/devel-api/adaptor-framework/window-devel.h | 8 ++++++++ dali/internal/window-system/common/window-impl.cpp | 5 +++++ dali/internal/window-system/common/window-impl.h | 5 +++++ dali/internal/window-system/common/window-render-surface.cpp | 7 ++++++- dali/internal/window-system/common/window-render-surface.h | 7 +++++++ 6 files changed, 36 insertions(+), 1 deletion(-) diff --git a/dali/devel-api/adaptor-framework/window-devel.cpp b/dali/devel-api/adaptor-framework/window-devel.cpp index 34b609a..0713159 100644 --- a/dali/devel-api/adaptor-framework/window-devel.cpp +++ b/dali/devel-api/adaptor-framework/window-devel.cpp @@ -244,6 +244,11 @@ bool IsMinimized(Window window) return GetImplementation(window).IsMinimized(); } +bool IsWindowRotating(Window window) +{ + return GetImplementation(window).IsWindowRotating(); +} + } // namespace DevelWindow } // namespace Dali diff --git a/dali/devel-api/adaptor-framework/window-devel.h b/dali/devel-api/adaptor-framework/window-devel.h index 8f51d27..459c289 100644 --- a/dali/devel-api/adaptor-framework/window-devel.h +++ b/dali/devel-api/adaptor-framework/window-devel.h @@ -480,6 +480,14 @@ DALI_ADAPTOR_API void Minimize(Window window, bool minimize); */ DALI_ADAPTOR_API bool IsMinimized(Window window); +/** + * @brief Query whether window is rotating or not. + * + * @param[in] window The window instance. + * @return true if window is rotating, false otherwise. + */ +DALI_ADAPTOR_API bool IsWindowRotating(Window window); + } // namespace DevelWindow } // namespace Dali diff --git a/dali/internal/window-system/common/window-impl.cpp b/dali/internal/window-system/common/window-impl.cpp index fc5a81d..545b382 100644 --- a/dali/internal/window-system/common/window-impl.cpp +++ b/dali/internal/window-system/common/window-impl.cpp @@ -1195,6 +1195,11 @@ void Window::SendRotationCompletedAcknowledgement() } } +bool Window::IsWindowRotating() const +{ + return mWindowSurface->IsWindowRotating(); +} + } // namespace Adaptor } // namespace Internal diff --git a/dali/internal/window-system/common/window-impl.h b/dali/internal/window-system/common/window-impl.h index ce91a7f..12d1c7f 100644 --- a/dali/internal/window-system/common/window-impl.h +++ b/dali/internal/window-system/common/window-impl.h @@ -454,6 +454,11 @@ public: // Dali::Internal::Adaptor::SceneHolder */ void SendRotationCompletedAcknowledgement(); + /** + * @copydoc Dali::DevelWindow::IsWindowRotating() + */ + bool IsWindowRotating() const; + private: /** * @brief Enumeration for orietation mode. diff --git a/dali/internal/window-system/common/window-render-surface.cpp b/dali/internal/window-system/common/window-render-surface.cpp index a0523d3..c6cee4a 100644 --- a/dali/internal/window-system/common/window-render-surface.cpp +++ b/dali/internal/window-system/common/window-render-surface.cpp @@ -747,13 +747,18 @@ void WindowRenderSurface::OutputTransformed() } } +bool WindowRenderSurface::IsWindowRotating() const +{ + return !(mWindowRotationFinished); +} + void WindowRenderSurface::ProcessPostRender() { if(!mWindowRotationFinished) { mWindowBase->WindowRotationCompleted(mWindowRotationAngle, mPositionSize.width, mPositionSize.height); - DALI_LOG_RELEASE_INFO("WindowRenderSurface::ProcessPostRender: Rotation Done\n"); mWindowRotationFinished = true; + DALI_LOG_RELEASE_INFO("WindowRenderSurface::ProcessPostRender: Rotation Done, flag = %d\n", mWindowRotationFinished); } if(mIsImeWindowSurface) diff --git a/dali/internal/window-system/common/window-render-surface.h b/dali/internal/window-system/common/window-render-surface.h index 5d248c0..5e58893 100644 --- a/dali/internal/window-system/common/window-render-surface.h +++ b/dali/internal/window-system/common/window-render-surface.h @@ -138,6 +138,13 @@ public: // API void UpdatePositionSize(Dali::PositionSize positionSize); /** + * @brief Query whether window is rotating or not. + * + * @return true if window is rotating, false otherwise. + */ + bool IsWindowRotating() const; + + /** * @brief This signal is emitted when the output is transformed. */ OutputSignalType& OutputTransformedSignal(); -- 2.7.4