Revert "[Tizen] Revert "Supports to change the window layer to the bottom""
authorEunki, Hong <eunkiki.hong@samsung.com>
Wed, 16 Oct 2024 06:50:01 +0000 (15:50 +0900)
committerEunki, Hong <eunkiki.hong@samsung.com>
Wed, 16 Oct 2024 06:50:01 +0000 (15:50 +0900)
This reverts commit 10af58189f2b42cc82548a59d45936b3e94be150.

17 files changed:
dali/devel-api/adaptor-framework/window-devel.cpp
dali/devel-api/adaptor-framework/window-devel.h
dali/internal/window-system/android/window-base-android.cpp
dali/internal/window-system/android/window-base-android.h
dali/internal/window-system/common/window-base.h
dali/internal/window-system/common/window-impl.cpp
dali/internal/window-system/common/window-impl.h
dali/internal/window-system/macos/window-base-mac.h
dali/internal/window-system/macos/window-base-mac.mm
dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.cpp
dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.h
dali/internal/window-system/ubuntu-x11/window-base-ecore-x.cpp
dali/internal/window-system/ubuntu-x11/window-base-ecore-x.h
dali/internal/window-system/windows/window-base-win.cpp
dali/internal/window-system/windows/window-base-win.h
dali/internal/window-system/x11/window-base-x.cpp
dali/internal/window-system/x11/window-base-x.h

index 243c8c5bb16499688fe6ec370f1e00de179758c4..37a107cc5381e67ad13243504da42b505e0efab4 100644 (file)
@@ -389,6 +389,16 @@ bool IsAlwaysOnTop(Window window)
   return GetImplementation(window).IsAlwaysOnTop();
 }
 
+void SetToBottom(Window window, bool toBottom)
+{
+  GetImplementation(window).SetToBottom(toBottom);
+}
+
+bool IsBottom(Window window)
+{
+  return GetImplementation(window).IsBottom();
+}
+
 Any GetNativeBuffer(Window window)
 {
   return GetImplementation(window).GetNativeBuffer();
index 481aa8d7ec6d010381712611e38a68b89bc5db53..34e06e17eb7a29b5f7c88ca5b1a13cf777ca05ea 100644 (file)
@@ -685,6 +685,7 @@ DALI_ADAPTOR_API bool IsModal(Window window);
 
 /**
  * @brief Enables or disables the window always is on top.
+ * 
  *
  * @param[in] window The window instance.
  * @param[in] alwaysOnTop true to enable the window always is on top, false to disable.
@@ -694,11 +695,30 @@ DALI_ADAPTOR_API void SetAlwaysOnTop(Window window, bool alwaysOnTop);
 /**
  * @brief Returns whether the window always is on top.
  *
+ * This is valid between windows that have no notification level or a notification level of 'none'.
+ * If it has a notification level, this will not do anything.
+ *
  * @param[in] window The window instance.
  * @return True if the window always is on top, false otherwise.
  */
 DALI_ADAPTOR_API bool IsAlwaysOnTop(Window window);
 
+/**
+ * @brief Enables or disables the window's layer is changed to the bottom.
+ *
+ * @param[in] window The window instance.
+ * @param[in] toBottom true to change the window layer to the bottom.
+ */
+DALI_ADAPTOR_API void SetToBottom(Window window, bool toBottom);
+
+/**
+ * @brief Returns whether the window layer is the bottom or not.
+ *
+ * @param[in] window The window instance.
+ * @return True if the window layer is the bottom, false otherwise.
+ */
+DALI_ADAPTOR_API bool IsBottom(Window window);
+
 /**
  * @brief Gets the native buffer of the window.
  *
index 4c13e7053d2c795f0d31fb9c8998f3bc1135813d..75e37e64adc906f1713b5f92f71db6bb08f6acbe 100644 (file)
@@ -516,6 +516,15 @@ bool WindowBaseAndroid::IsAlwaysOnTop()
   return false;
 }
 
+void WindowBaseAndroid::SetToBottom(bool toBottom)
+{
+}
+
+bool WindowBaseAndroid::IsBottom()
+{
+  return false;
+}
+
 Any WindowBaseAndroid::GetNativeBuffer() const
 {
   return 0;
index f9c4e4d5504d7271b2e343ac2f82ddf133b95b44..e6db23f5b04de09e24bcc6d9f9af7211d0abae8b 100644 (file)
@@ -539,6 +539,16 @@ public:
    */
   bool IsAlwaysOnTop() override;
 
+  /**
+   * @copydoc Dali::Internal::Adaptor::WindowBase::SetToBottom()
+   */
+  void SetToBottom(bool toBottom) override;
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::WindowBase::IsBottom()
+   */
+  bool IsBottom() override;
+
   /**
    * @copydoc Dali::Internal::Adaptor::WindowBase::GetNativeBuffer()
    */
index 7a7ff25dfb1aee7d11812215e52b8fcffc7e1cfc..91b2dd26c8fcc8d5a7ba53aaa2af1ef4fb2339c0 100644 (file)
@@ -582,6 +582,9 @@ public:
   /**
    * @brief Enables or disables the window always is on top.
    *
+   * This is valid between windows that have no notification level or a notification level of 'none'.
+   * If it has a notification level, this will not do anything.
+   *
    * @param[in] alwaysOnTop true to enable the window always is on top, false to disable.
    */
   virtual void SetAlwaysOnTop(bool alwaysOnTop) = 0;
@@ -593,6 +596,20 @@ public:
    */
   virtual bool IsAlwaysOnTop() = 0;
 
+  /**
+   * @brief Enables or disables the window's layer is changed to the bottom.
+   *
+   * @param[in] toBottom true to change the window layer to the bottom.
+   */
+  virtual void SetToBottom(bool toBottom) = 0;
+
+  /**
+   * @brief Returns whether the window layer is the bottom or not.
+   *
+   * @return True if the window layer is the bottom, false otherwise.
+   */
+  virtual bool IsBottom() = 0;
+
   /**
    * @brief Get native buffer of window.
    * @return The native window buffer handle
index 2ff068ec7de17fdd4a56e63a4129b4b69d9eb5b1..df760143b49f6eb1cf9f08b211257bc1bee4075d 100644 (file)
@@ -1649,6 +1649,16 @@ bool Window::IsAlwaysOnTop()
   return mWindowBase->IsAlwaysOnTop();
 }
 
+void Window::SetToBottom(bool toBottom)
+{
+  mWindowBase->SetToBottom(toBottom);
+}
+
+bool Window::IsBottom()
+{
+  return mWindowBase->IsBottom();
+}
+
 Dali::Any Window::GetNativeBuffer() const
 {
   return mWindowBase->GetNativeBuffer();
index 031046915e0f5bf5ab6bcc4b7b4be53777854ff7..c995aed9eccba5989f6521e7dc0c65dcb03d1ed6 100644 (file)
@@ -602,6 +602,16 @@ public: // Dali::Internal::Adaptor::SceneHolder
    */
   bool IsAlwaysOnTop();
 
+  /**
+   * @copydoc Dali::DevelWindow::SetToBottom()
+   */
+  void SetToBottom(bool toBottom);
+
+  /**
+   * @copydoc Dali::DevelWindow::IsBottom()
+   */
+  bool IsBottom();
+
   /**
    * @copydoc Dali::DevelWindow::GetNativeBuffer()
    */
index 190286fd4284e96db69ddd4161710fc48b91e1cf..114e95af208ae68590bf36c344c142de302590eb 100644 (file)
@@ -467,6 +467,16 @@ public:
    */
   bool IsAlwaysOnTop() override;
 
+  /**
+   * @copydoc Dali::Internal::Adaptor::WindowBase::SetToBottom()
+   */
+  void SetToBottom(bool toBottom) override;
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::WindowBase::IsBottom()
+   */
+  bool IsBottom() override;
+
   /**
    * @brief Sets front buffer rendering to the window.
    * @param[in] enable True to enable front buffer rendering mode, False to otherwise.
index 303ddf2ad8f40f66adacff5d9d079dd0d1353023..ca471b1a259d3ae3470e1e6bdc3e94512d6da04a 100644 (file)
@@ -824,6 +824,15 @@ bool WindowBaseCocoa::IsAlwaysOnTop()
   return false;
 }
 
+void WindowBaseCocoa::SetToBottom(bool toBottom)
+{
+}
+
+bool WindowBaseCocoa::IsBottom()
+{
+  return false;
+}
+
 Any WindowBaseCocoa::GetNativeBuffer() const
 {
   return 0;
index 343347c92d09b4665d02e6ad69b222f645b826b3..1ea0a044db196633d06f2626b7fca3d31ea036e0 100644 (file)
@@ -936,7 +936,8 @@ WindowBaseEcoreWl2::WindowBaseEcoreWl2(Dali::PositionSize positionSize, Any surf
   mOwnSurface(false),
   mBrightnessChangeDone(true),
   mIsFrontBufferRendering(false),
-  mIsIMEWindowInitialized(false)
+  mIsIMEWindowInitialized(false),
+  mToBottom(false)
 {
   Initialize(positionSize, surface, isTransparent);
 }
@@ -3690,6 +3691,7 @@ void WindowBaseEcoreWl2::SetAlwaysOnTop(bool alwaysOnTop)
   DALI_LOG_RELEASE_INFO("ecore_wl2_window_pin_mode_set, window: [%p], flag [%d]\n", mEcoreWindow, alwaysOnTop);
   START_DURATION_CHECK();
   ecore_wl2_window_pin_mode_set(mEcoreWindow, alwaysOnTop);
+  ecore_wl2_window_commit(mEcoreWindow, EINA_TRUE);
   FINISH_DURATION_CHECK("ecore_wl2_window_pin_mode_set");
 }
 
@@ -3700,6 +3702,29 @@ bool WindowBaseEcoreWl2::IsAlwaysOnTop()
   return ret;
 }
 
+void WindowBaseEcoreWl2::SetToBottom(bool toBottom)
+{
+  START_DURATION_CHECK();
+  mToBottom = toBottom;
+  if(toBottom)
+  {
+    DALI_LOG_RELEASE_INFO("ecore_wl2_window_stack_mode_set, window: [%p], flag[%d] ECORE_WL2_WINDOW_STACK_BELOW\n", mEcoreWindow, toBottom);
+    ecore_wl2_window_stack_mode_set(mEcoreWindow, ECORE_WL2_WINDOW_STACK_BELOW);
+  }
+  else
+  {
+    DALI_LOG_RELEASE_INFO("ecore_wl2_window_stack_mode_set, window: [%p], flag[%d] ECORE_WL2_WINDOW_STACK_NONE\n", mEcoreWindow, toBottom);
+    ecore_wl2_window_stack_mode_set(mEcoreWindow, ECORE_WL2_WINDOW_STACK_NONE);
+  }
+  ecore_wl2_window_commit(mEcoreWindow, EINA_TRUE);
+  FINISH_DURATION_CHECK("ecore_wl2_window_pin_mode_set");
+}
+
+bool WindowBaseEcoreWl2::IsBottom()
+{
+  return mToBottom;
+}
+
 Any WindowBaseEcoreWl2::GetNativeBuffer() const
 {
   DALI_LOG_RELEASE_INFO("Get wl_egl_window, ecore_window: [%p], wl_egl_window [%p]\n", mEcoreWindow, mEglWindow);
index dd0d137aef639ec9c9814b8419b35d59fa5b1ee8..0df5b4afcb4eea464a1f58ca0add627362eb5199 100644 (file)
@@ -682,6 +682,16 @@ public:
    */
   bool IsAlwaysOnTop() override;
 
+  /**
+   * @copydoc Dali::Internal::Adaptor::WindowBase::SetToBottom()
+   */
+  void SetToBottom(bool toBottom) override;
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::WindowBase::IsBottom()
+   */
+  bool IsBottom() override;
+
   /**
    * @copydoc Dali::Internal::Adaptor::WindowBase::GetNativeBuffer()
    */
@@ -806,6 +816,7 @@ private:
   bool mBrightnessChangeDone;
   bool mIsFrontBufferRendering;
   bool mIsIMEWindowInitialized;
+  bool mToBottom;
 };
 
 } // namespace Adaptor
index a1a434587fbfd52afa0674c22c2614217468c84d..69bb658d18ff55bfc332b776806e7135437a2ac9 100644 (file)
@@ -1115,6 +1115,15 @@ bool WindowBaseEcoreX::IsAlwaysOnTop()
   return false;
 }
 
+void WindowBaseEcoreX::SetToBottom(bool toBottom)
+{
+}
+
+bool WindowBaseEcoreX::IsBottom()
+{
+  return false;
+}
+
 Any WindowBaseEcoreX::GetNativeBuffer() const
 {
   return 0;
index fb68356a3359cb0aad2e4332a08306e117bfc673..4c65241a4563f74ea9757e2466b4600438ffe313 100644 (file)
@@ -544,6 +544,16 @@ public:
    */
   bool IsAlwaysOnTop() override;
 
+  /**
+   * @copydoc Dali::Internal::Adaptor::WindowBase::SetToBottom()
+   */
+  void SetToBottom(bool toBottom) override;
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::WindowBase::IsBottom()
+   */
+  bool IsBottom() override;
+
   /**
    * @copydoc Dali::Internal::Adaptor::WindowBase::GetNativeBuffer()
    */
index f42bd1e6dd581e611816eb95e98e5119d5431159..784d51760caf932e5917b325eece2c8d87f64066 100644 (file)
@@ -744,6 +744,15 @@ bool WindowBaseWin::IsAlwaysOnTop()
   return false;
 }
 
+void WindowBaseWin::SetToBottom(bool toBottom)
+{
+}
+
+bool WindowBaseWin::IsBottom()
+{
+  return false;
+}
+
 Any WindowBaseWin::GetNativeBuffer() const
 {
   return 0;
index dff49ac5bd91cc7abdfda839decbeee4517677cd..3e0a0c720b99294b934777f2ed9a76ca8ba2b7ce 100644 (file)
@@ -526,6 +526,16 @@ public:
    */
   bool IsAlwaysOnTop() override;
 
+  /**
+   * @copydoc Dali::Internal::Adaptor::WindowBase::SetToBottom()
+   */
+  void SetToBottom(bool toBottom) override;
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::WindowBase::IsBottom()
+   */
+  bool IsBottom() override;
+
   /**
    * @copydoc Dali::Internal::Adaptor::WindowBase::GetNativeBuffer()
    */
index 7ff6b7fec4944b3e66bb5a61c3099496291a20f6..32b7cdc297b5bc64b22da0fc37b4302a4ad4ce2d 100644 (file)
@@ -1049,6 +1049,15 @@ bool WindowBaseX::IsAlwaysOnTop()
   return false;
 }
 
+void WindowBaseX::SetToBottom(bool toBottom)
+{
+}
+
+bool WindowBaseX::IsBottom()
+{
+  return false;
+}
+
 Any WindowBaseX::GetNativeBuffer()
 {
   return 0;
index 004bc3d233dbb2eed687dc377b1d0978dcaf3a10..6e43002289ee83506f2efd5d60ef3893b05892ca 100644 (file)
@@ -549,6 +549,16 @@ public:
    */
   bool IsAlwaysOnTop() override;
 
+  /**
+   * @copydoc Dali::Internal::Adaptor::WindowBase::SetToBottom()
+   */
+  void SetToBottom(bool toBottom) override;
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::WindowBase::IsBottom()
+   */
+  bool IsBottom() override;
+
   /**
    * @copydoc Dali::Internal::Adaptor::WindowBase::GetNativeBuffer()
    */