Make Window::SetBackground works well if transparency changed 24/312224/1
authorEunki, Hong <eunkiki.hong@samsung.com>
Wed, 5 Jun 2024 07:21:00 +0000 (16:21 +0900)
committerEunki, Hong <eunkiki.hong@samsung.com>
Wed, 5 Jun 2024 07:21:00 +0000 (16:21 +0900)
Change-Id: Id682bbd86989077ed5a5d1bbc3ecf008f0613960
Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
dali/internal/window-system/common/window-impl.cpp

index c08226f5736f7d78f602953ad38bf48267e60350..8ea3b47889648156f3d70a28b11a624106cb6bb9 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2023 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2024 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.
@@ -907,9 +907,12 @@ Vector4 Window::GetBackgroundColor() const
 
 void Window::SetTransparency(bool transparent)
 {
-  mIsTransparent = transparent;
+  if(mIsTransparent != transparent)
+  {
+    mIsTransparent = transparent;
+    Window::SetBackgroundColor(mBackgroundColor);
+  }
   mWindowSurface->SetTransparency(mIsTransparent);
-  SceneHolder::SetBackgroundColor(mBackgroundColor);
 }
 
 bool Window::GrabKey(Dali::KEY key, KeyGrab::KeyGrabMode grabMode)