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. Change-Id: Ie150b6c6d7ca6c9344a9097544a7edbc4bd10df2 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
This commit is contained in:
parent
a6faecba1a
commit
48c73540ad
@ -1436,13 +1436,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();
|
||||
|
@ -6908,14 +6908,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