summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@digia.com>2014-02-05 14:59:49 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-02-07 04:47:04 +0100
commitb9fe8e30cbd7564d9610e097e219212663e42165 (patch)
treec01e98ba781b34741d743afecbefbbc8a551d44f /src/gui/kernel
parentb2d5e7805abe569a926eb087a75bd903261b734f (diff)
QPA: Introduce QPlatformWindow::normalGeometry().
QWidgetWindow stores the normal geometry obtained from the widget when transiting to other states. This does not work reliably on Windows, where this geometry is already that of the new state. Instead, introduce QPlatformWindow::normalGeometry(), add implementation for Windows and use that in QWidgetWindow. Task-number: QTBUG-21371 Change-Id: I3819ebaf55b4e7d2f7eef1affe6c20712ba45d7c Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qplatformwindow.cpp12
-rw-r--r--src/gui/kernel/qplatformwindow.h1
2 files changed, 13 insertions, 0 deletions
diff --git a/src/gui/kernel/qplatformwindow.cpp b/src/gui/kernel/qplatformwindow.cpp
index fe29627c5a..2364f465b6 100644
--- a/src/gui/kernel/qplatformwindow.cpp
+++ b/src/gui/kernel/qplatformwindow.cpp
@@ -127,6 +127,18 @@ QRect QPlatformWindow::geometry() const
return d->rect;
}
+/*!
+ Returns the geometry of a window in 'normal' state
+ (neither maximized, fullscreen nor minimized) for saving geometries to
+ application settings.
+
+ \since 5.3
+*/
+QRect QPlatformWindow::normalGeometry() const
+{
+ return QRect();
+}
+
QMargins QPlatformWindow::frameMargins() const
{
return QMargins();
diff --git a/src/gui/kernel/qplatformwindow.h b/src/gui/kernel/qplatformwindow.h
index 7dfbae036f..0adeb223f1 100644
--- a/src/gui/kernel/qplatformwindow.h
+++ b/src/gui/kernel/qplatformwindow.h
@@ -84,6 +84,7 @@ public:
virtual void setGeometry(const QRect &rect);
virtual QRect geometry() const;
+ virtual QRect normalGeometry() const;
virtual QMargins frameMargins() const;