Fix regression with frameless dialogs on Windows

Task-number: QTBUG-41162
Change-Id: I6d4e6d0e8a262fead30d642d632f6b4021cc20ab
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
bb10
Laszlo Agocs 2015-01-13 12:49:40 +01:00 committed by Friedemann Kleint
parent 9b35c2cc27
commit 5856f6e305
1 changed files with 6 additions and 2 deletions

View File

@ -514,8 +514,12 @@ void WindowCreationData::fromWindow(const QWindow *w, const Qt::WindowFlags flag
if (flags & Qt::WindowSystemMenuHint)
style |= WS_SYSMENU;
else if (dialog) {
style |= WS_SYSMENU | WS_BORDER; // QTBUG-2027, dialogs without system menu.
exStyle |= WS_EX_DLGMODALFRAME;
// QTBUG-2027, dialogs without system menu.
style |= WS_SYSMENU;
if (!(flags & Qt::FramelessWindowHint)) {
style |= WS_BORDER;
exStyle |= WS_EX_DLGMODALFRAME;
}
}
if (flags & Qt::WindowMinimizeButtonHint)
style |= WS_MINIMIZEBOX;