diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-02-25 09:52:15 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-04-09 10:30:07 +0000 |
commit | f932a85bd91556f608d884a61600ea0cacedd33f (patch) | |
tree | e274e150d72326149c996545d03f17789053d355 /src/plugins | |
parent | f3e405cb3b40c585cb5a535aa0562bfca74d3474 (diff) |
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>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/platforms/windows/qwindowswindow.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp index 6afa4e6591..b19510073a 100644 --- a/src/plugins/platforms/windows/qwindowswindow.cpp +++ b/src/plugins/platforms/windows/qwindowswindow.cpp @@ -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; |