Make sure Qt::Popup is treated like a dialog
According to the documentation, Qt::Popup should have a proper frame with a title bar. To honor this, two functions had to be slightly altered. Change-Id: I4bbc18e6b7fbec5702fad6e22ef2226c09dea15a Fixes: QTBUG-94768 Pick-to: 5.15 6.2 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
This commit is contained in:
parent
5335cc4a5a
commit
723a2c34a5
@ -248,8 +248,8 @@ QVariant QWasmIntegration::styleHint(QPlatformIntegration::StyleHint hint) const
|
||||
|
||||
Qt::WindowState QWasmIntegration::defaultWindowState(Qt::WindowFlags flags) const
|
||||
{
|
||||
// Don't maximize dialogs
|
||||
if (flags & Qt::Dialog & ~Qt::Window)
|
||||
// Don't maximize dialogs or popups
|
||||
if (flags.testFlag(Qt::Dialog) || flags.testFlag(Qt::Popup))
|
||||
return Qt::WindowNoState;
|
||||
|
||||
return QPlatformIntegration::defaultWindowState(flags);
|
||||
|
@ -407,7 +407,6 @@ bool QWasmWindow::hasTitleBar() const
|
||||
auto flags = window()->flags();
|
||||
return !(m_windowState & Qt::WindowFullScreen)
|
||||
&& flags.testFlag(Qt::WindowTitleHint)
|
||||
&& !flags.testFlag(Qt::Popup)
|
||||
&& !flags.testFlag(Qt::ToolTip)
|
||||
&& m_needsCompositor;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user