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 48c73540ad
.
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>
This commit is contained in:
parent
a496b5dc38
commit
8c8e9f59bc
@ -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();
|
||||
|
@ -6916,14 +6916,15 @@ void QWidget::setUpdatesEnabled(bool enable)
|
||||
Shows the widget and its child widgets. This function is
|
||||
equivalent to setVisible(true) in the normal case, and equivalent
|
||||
to showFullScreen() if the QStyleHints::showIsFullScreen() hint
|
||||
is true.
|
||||
is true and the window is not a popup.
|
||||
|
||||
\sa raise(), showEvent(), hide(), setVisible(), showMinimized(), showMaximized(),
|
||||
showNormal(), isVisible()
|
||||
showNormal(), isVisible(), windowFlags()
|
||||
*/
|
||||
void QWidget::show()
|
||||
{
|
||||
if (isWindow() && qApp->styleHints()->showIsFullScreen())
|
||||
bool isPopup = data->window_flags & Qt::Popup & ~Qt::Window;
|
||||
if (isWindow() && !isPopup && qApp->styleHints()->showIsFullScreen())
|
||||
showFullScreen();
|
||||
else
|
||||
setVisible(true);
|
||||
|
Loading…
Reference in New Issue
Block a user