Windows: Fix dialog close button showing despite ~Qt::WindowCloseButtonHint.
Further restrict the condition under which the special window flags for QTBUG-2027 apply. Change-Id: I458c7c6bfb06820992b5a21820c0439fd2ce7d9d Task-number: QTBUG-2027 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
This commit is contained in:
parent
f3e405cb3b
commit
f932a85bd9
@ -540,13 +540,9 @@ void WindowCreationData::fromWindow(const QWindow *w, const Qt::WindowFlags flag
|
||||
}
|
||||
if (flags & Qt::WindowSystemMenuHint)
|
||||
style |= WS_SYSMENU;
|
||||
else if (dialog) {
|
||||
// QTBUG-2027, dialogs without system menu.
|
||||
style |= WS_SYSMENU;
|
||||
if (!(flags & Qt::FramelessWindowHint)) {
|
||||
style |= WS_BORDER;
|
||||
exStyle |= WS_EX_DLGMODALFRAME;
|
||||
}
|
||||
else if (dialog && (flags & Qt::WindowCloseButtonHint) && !(flags & Qt::FramelessWindowHint)) {
|
||||
style |= WS_SYSMENU | WS_BORDER; // QTBUG-2027, dialogs without system menu.
|
||||
exStyle |= WS_EX_DLGMODALFRAME;
|
||||
}
|
||||
if (flags & Qt::WindowMinimizeButtonHint)
|
||||
style |= WS_MINIMIZEBOX;
|
||||
|
Loading…
Reference in New Issue
Block a user