diff options
author | Samuel Rødal <samuel.rodal@nokia.com> | 2012-01-11 08:31:00 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-01-12 10:19:49 +0100 |
commit | 8ff37ff535318331f0179cdf0d2f6319cd7ae1c2 (patch) | |
tree | 640cd1a229f497624a4fc49bc24843ef2341fd35 /src/plugins | |
parent | bffbcfd0ccc863884701e79a260b1b05f9dc8bb0 (diff) |
Make show() default to sane sizing behaviour based on the platform.
Traditionally it's been hard to write a Qt app that behaves sanely
across embedded and desktop platforms, i.e. defaults to fullscreen on
embedded and non-fullscreen on desktop. For Qt 5 we can fix this by
making the behaviour of the default QWindow::show() be customizable by
the platform plugin.
If the application developer wants to override this behaviour he can
still use the explicit showFullScreen(), showNormal() etc functions.
Change-Id: I26a907b404058e345d841c818daefbb57a26d3fd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/platforms/eglfs/qeglfsintegration.cpp | 8 | ||||
-rw-r--r-- | src/plugins/platforms/eglfs/qeglfsintegration.h | 2 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/plugins/platforms/eglfs/qeglfsintegration.cpp b/src/plugins/platforms/eglfs/qeglfsintegration.cpp index 12d196ffd6..47d5bd49eb 100644 --- a/src/plugins/platforms/eglfs/qeglfsintegration.cpp +++ b/src/plugins/platforms/eglfs/qeglfsintegration.cpp @@ -110,4 +110,12 @@ QAbstractEventDispatcher *QEglFSIntegration::guiThreadEventDispatcher() const return createUnixEventDispatcher(); } +QVariant QEglFSIntegration::styleHint(QPlatformIntegration::StyleHint hint) const +{ + if (hint == QPlatformIntegration::ShowIsFullScreen) + return true; + + return QPlatformIntegration::styleHint(hint); +} + QT_END_NAMESPACE diff --git a/src/plugins/platforms/eglfs/qeglfsintegration.h b/src/plugins/platforms/eglfs/qeglfsintegration.h index 997ed3afd2..58af1462b0 100644 --- a/src/plugins/platforms/eglfs/qeglfsintegration.h +++ b/src/plugins/platforms/eglfs/qeglfsintegration.h @@ -66,6 +66,8 @@ public: QAbstractEventDispatcher *guiThreadEventDispatcher() const; + QVariant styleHint(QPlatformIntegration::StyleHint hint) const; + private: QPlatformFontDatabase *mFontDb; }; |