diff options
author | Richard Moe Gustavsen <richard.gustavsen@digia.com> | 2013-01-24 16:41:24 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-03-02 10:52:56 +0100 |
commit | 8c8e9f59bcbf6ce394b9ae081988f3d294438acd (patch) | |
tree | a2a06b9191c2720f41248a3ce619ec12ccdfdc09 /src/gui/kernel/qwindow.cpp | |
parent | a496b5dc38c96465e6ea4750ef293d8f2c3b6fc5 (diff) |
showIsFullscreen: only respect this hint for windows and dialogs
If the window or widget is a popup, ignore the hint. The
intention of the flag should be to show main windows etc in
fullscreen, and not all kinds of popups and tooltips. The user can always
call showFullscreen explicit when necessary.
This is a backport of 48c73540ad2a507963db0fba57484faf66462ad7.
We need it in stable to fix menus on BlackBerry platform, they're
appearing fullscreen.
Task-number: QTBUG-29969
Change-Id: Id0d6cfc194916aa7f993cde54b5a0002f60399e1
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Diffstat (limited to 'src/gui/kernel/qwindow.cpp')
-rw-r--r-- | src/gui/kernel/qwindow.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp index 2a2e30634a..f4a2059d74 100644 --- a/src/gui/kernel/qwindow.cpp +++ b/src/gui/kernel/qwindow.cpp @@ -1449,13 +1449,15 @@ QObject *QWindow::focusObject() const Shows the window. This equivalent to calling showFullScreen() or showNormal(), depending - on whether the platform defaults to windows being fullscreen or not. + on whether the platform defaults to windows being fullscreen or not, and + whether the window is a popup. - \sa showFullScreen(), showNormal(), hide(), QStyleHints::showIsFullScreen() + \sa showFullScreen(), showNormal(), hide(), QStyleHints::showIsFullScreen(), flags() */ void QWindow::show() { - if (qApp->styleHints()->showIsFullScreen()) + bool isPopup = d_func()->windowFlags & Qt::Popup & ~Qt::Window; + if (!isPopup && qApp->styleHints()->showIsFullScreen()) showFullScreen(); else showNormal(); |