mOpaqueState(false),
mWindowRotationAcknowledgement(false),
mFocused(false),
- mIsWindowRotating(false)
+ mIsWindowRotating(false),
+ mIsEnabledUserGeometry(false)
{
}
mWindowSurface->OutputTransformedSignal().Connect(this, &Window::OnOutputTransformed);
mWindowSurface->RotationFinishedSignal().Connect(this, &Window::OnRotationFinished);
- AddAuxiliaryHint("wm.policy.win.user.geometry", "1");
-
SetClass(name, className);
mOrientation = Orientation::New(this);
mOrientationMode = Internal::Adaptor::Window::OrientationMode::PORTRAIT;
}
- if(positionSize.width <= 0 || positionSize.height <= 0)
+ mWindowWidth = positionSize.width;
+ mWindowHeight = positionSize.height;
+
+ bool isSetWithScreenSize = false;
+ if(mWindowWidth <= 0 || mWindowHeight <= 0)
{
- mWindowWidth = screenWidth;
- mWindowHeight = screenHeight;
+ mWindowWidth = screenWidth;
+ mWindowHeight = screenHeight;
+ isSetWithScreenSize = true;
+ DALI_LOG_RELEASE_INFO("Window size is set with screen size(%d x %d)\n", mWindowWidth, mWindowHeight);
}
- else
+
+ if(isSetWithScreenSize == false || positionSize.x != 0 || positionSize.y != 0)
{
- mWindowWidth = positionSize.width;
- mWindowHeight = positionSize.height;
+ SetUserGeometryPolicy();
}
// For Debugging
newRect.width = size.GetWidth();
newRect.height = size.GetHeight();
+ SetUserGeometryPolicy();
+
// When surface size is updated, inform adaptor of resizing and emit ResizeSignal
if((oldRect.width != newRect.width) || (oldRect.height != newRect.height))
{
int32_t newX = position.GetX();
int32_t newY = position.GetY();
+ SetUserGeometryPolicy();
+
mWindowSurface->Move(PositionSize(newX, newY, oldRect.width, oldRect.height));
if((oldRect.x != newX) || (oldRect.y != newY))
PositionSize oldRect = GetPositionSize();
Dali::Window handle(this);
+ SetUserGeometryPolicy();
+
if((oldRect.x != positionSize.x) || (oldRect.y != positionSize.y))
{
moved = true;
void Window::SetLayout(unsigned int numCols, unsigned int numRows, unsigned int column, unsigned int row, unsigned int colSpan, unsigned int rowSpan)
{
+ SetUserGeometryPolicy();
mWindowBase->SetLayout(numCols, numRows, column, row, colSpan, rowSpan);
}
void Window::RequestMoveToServer()
{
+ SetUserGeometryPolicy();
mWindowBase->RequestMoveToServer();
}
void Window::RequestResizeToServer(WindowResizeDirection direction)
{
+ SetUserGeometryPolicy();
mWindowBase->RequestResizeToServer(direction);
}
return mLastTouchEvent;
}
+void Window::SetUserGeometryPolicy()
+{
+ if(mIsEnabledUserGeometry == true)
+ {
+ return;
+ }
+
+ mIsEnabledUserGeometry = true;
+ AddAuxiliaryHint("wm.policy.win.user.geometry", "1");
+ DALI_LOG_RELEASE_INFO("Window (%p), WinId (%d), window user.geometry is changed\n", this, mNativeWindowId);
+}
+
} // namespace Adaptor
} // namespace Internal
*/
bool IsOrientationAvailable(WindowOrientation orientation) const;
+ /**
+ * @brief Sets user geometry flag when window's geometry is changed.
+ * Window is created with screen size or not.
+ * If window is created with screen size or the geometry is changed by user,
+ * client should inform to server setting user.geometry flag
+ */
+ void SetUserGeometryPolicy();
+
private: // Dali::Internal::Adaptor::SceneHolder
/**
* @copydoc Dali::Internal::Adaptor::SceneHolder::OnAdaptorSet
std::vector<int> mAvailableAngles;
int mPreferredAngle;
- int mRotationAngle; ///< The angle of the rotation
- int mWindowWidth; ///< The width of the window
- int mWindowHeight; ///< The height of the window
- int mNativeWindowId; ///< The Native Window Id
+ int mRotationAngle; ///< The angle of the rotation
+ int mWindowWidth; ///< The width of the window
+ int mWindowHeight; ///< The height of the window
+ int mNativeWindowId; ///< The Native Window Id
EventHandlerPtr mEventHandler; ///< The window events handler
OrientationMode mOrientationMode; ///< The physical screen mode is portrait or landscape
bool mOpaqueState : 1;
bool mWindowRotationAcknowledgement : 1;
bool mFocused : 1;
- bool mIsWindowRotating : 1; ///< The window rotating flag.
+ bool mIsWindowRotating : 1; ///< The window rotating flag.
+ bool mIsEnabledUserGeometry : 1; ///< The user geometry enable flag.
};
} // namespace Adaptor