Add QPlatformWindow::windowFrameGeometry()

Convenience accessor for use by the Wayland
platform plugin.

Change-Id: I420209138cfc285f8396913548b9e158a35ee9c1
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
This commit is contained in:
Morten Johan Sørvig 2015-08-06 22:44:09 +02:00
parent 8f747efcc1
commit a50db99d15
2 changed files with 9 additions and 0 deletions

View File

@ -689,6 +689,14 @@ QRect QPlatformWindow::windowGeometry() const
return QHighDpi::toNativePixels(window()->geometry(), window());
}
/*!
Returns the QWindow frame geometry.
*/
QRect QPlatformWindow::windowFrameGeometry() const
{
return QHighDpi::toNativePixels(window()->frameGeometry(), window());
}
/*!
Returns the closest acceptable geometry for a given geometry before
a resize/move event for platforms that support it, for example to

View File

@ -138,6 +138,7 @@ public:
QSize windowBaseSize() const;
QSize windowSizeIncrement() const;
QRect windowGeometry() const;
QRect windowFrameGeometry() const;
QRectF windowClosestAcceptableGeometry(const QRectF &nativeRect) const;
protected: