From cfdd7e4bbcfe62d0b52058b7608691a115dd1f36 Mon Sep 17 00:00:00 2001 From: Wonsik Jung Date: Tue, 15 Jun 2021 09:49:50 +0900 Subject: [PATCH] Add the exception case for window rotation. When window rotaton event occurs, the window's size in rotation evnet value is initialized with 0 value. To fix that, if window's size in rotation event value is zero, the value should be modified using DALi local data. In addition, fix the one human error. Change-Id: I03330dcb491b70e6b3abe1e56a9043b859adb215 --- .../tizen-wayland/ecore-wl2/window-base-ecore-wl2.cpp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.cpp b/dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.cpp index 4fe0a30..b8227e0 100644 --- a/dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.cpp +++ b/dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.cpp @@ -980,6 +980,22 @@ void WindowBaseEcoreWl2::OnRotation(void* data, int type, void* event) RotationEvent rotationEvent; rotationEvent.angle = ev->angle; rotationEvent.winResize = 0; + + if(ev->w == 0 || ev->h ==0) + { + // Use previous client side window's size. + if(mWindowRotationAngle == 90 || mWindowRotationAngle == 270) + { + ev->w = mWindowPositionSize.height; + ev->h = mWindowPositionSize.width; + } + else + { + ev->w = mWindowPositionSize.width; + ev->h = mWindowPositionSize.height; + } + } + mWindowRotationAngle = ev->angle; if(ev->angle == 0 || ev->angle == 180) @@ -1940,7 +1956,7 @@ Dali::WindowOperationResult WindowBaseEcoreWl2::SetNotificationLevel(Dali::Windo if(!mNotificationLevelChangeDone) { DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Verbose, "WindowBaseEcoreWl2::SetNotificationLevel: Level change is failed [%d, %d]\n", level, mNotificationChangeState); - Dali::WindowOperationResult::UNKNOWN_ERROR; + return Dali::WindowOperationResult::UNKNOWN_ERROR; } else if(mNotificationChangeState == TIZEN_POLICY_ERROR_STATE_PERMISSION_DENIED) { -- 2.7.4