Revert "Windows: Check for bitmask instead for equality for initial window flags"
This reverts commit 369be485101c856c626a85f77ea087603dcf8b6c. Reason for revert: This breaks the customize window hints on Windows. Fixes: QTBUG-133940 Change-Id: Ib553c3f3742a14e0487cda27d057a4f4d50f76e2 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
parent
9b35b477f7
commit
6dcae3c144
@ -654,13 +654,18 @@ static inline void fixTopLevelWindowFlags(Qt::WindowFlags &flags)
|
||||
{
|
||||
// Not supported on Windows, also do correction when it is set.
|
||||
flags &= ~Qt::WindowFullscreenButtonHint;
|
||||
if (flags.testFlags((Qt::Dialog | Qt::Tool) & ~Qt::Window)) {
|
||||
flags |= Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowCloseButtonHint;
|
||||
} else if (flags.testFlag(Qt::Window)) {
|
||||
switch (flags) {
|
||||
case Qt::Window:
|
||||
flags |= Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowMinimizeButtonHint
|
||||
|Qt::WindowMaximizeButtonHint|Qt::WindowCloseButtonHint;
|
||||
break;
|
||||
case Qt::Dialog:
|
||||
case Qt::Tool:
|
||||
flags |= Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowCloseButtonHint;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if ((flags & Qt::WindowType_Mask) == Qt::SplashScreen)
|
||||
flags |= Qt::FramelessWindowHint;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user