summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qplatformwindow.cpp
diff options
context:
space:
mode:
authorMorten Johan Sørvig <morten.sorvig@theqtcompany.com>2015-08-06 22:44:09 +0200
committerMorten Johan Sørvig <morten.sorvig@theqtcompany.com>2015-08-13 18:28:51 +0000
commita50db99d1590c05d4dd1a9f2b58a10e6ade55d7d (patch)
treec12763df942d35c5a6df53e8a440862fe5df8c00 /src/gui/kernel/qplatformwindow.cpp
parent8f747efcc14e2f3114821c2c2bfbc3991610890e (diff)
Add QPlatformWindow::windowFrameGeometry()
Convenience accessor for use by the Wayland platform plugin. Change-Id: I420209138cfc285f8396913548b9e158a35ee9c1 Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
Diffstat (limited to 'src/gui/kernel/qplatformwindow.cpp')
-rw-r--r--src/gui/kernel/qplatformwindow.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gui/kernel/qplatformwindow.cpp b/src/gui/kernel/qplatformwindow.cpp
index d10bd1e9eb..0430d5a4c6 100644
--- a/src/gui/kernel/qplatformwindow.cpp
+++ b/src/gui/kernel/qplatformwindow.cpp
@@ -690,6 +690,14 @@ QRect QPlatformWindow::windowGeometry() const
}
/*!
+ 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
implement heightForWidth().