Windows QPA: Fix indention
It seems this block of code was originally copied from elsewhere so the original indention is preserved. Pick-to: 6.4 Change-Id: I53ab8e58b4304dfc768bd6472255a6c2d0471d5e Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This commit is contained in:
parent
122270d6be
commit
1e71071c92
@ -790,54 +790,54 @@ void WindowCreationData::fromWindow(const QWindow *w, const Qt::WindowFlags flag
|
|||||||
style = WS_CHILD;
|
style = WS_CHILD;
|
||||||
}
|
}
|
||||||
|
|
||||||
// if (!testAttribute(Qt::WA_PaintUnclipped))
|
// if (!testAttribute(Qt::WA_PaintUnclipped))
|
||||||
// ### Commented out for now as it causes some problems, but
|
// ### Commented out for now as it causes some problems, but
|
||||||
// this should be correct anyway, so dig some more into this
|
// this should be correct anyway, so dig some more into this
|
||||||
#ifdef Q_FLATTEN_EXPOSE
|
#ifdef Q_FLATTEN_EXPOSE
|
||||||
if (windowIsOpenGL(w)) // a bit incorrect since the is-opengl status may change from false to true at any time later on
|
if (windowIsOpenGL(w)) // a bit incorrect since the is-opengl status may change from false to true at any time later on
|
||||||
style |= WS_CLIPSIBLINGS | WS_CLIPCHILDREN; // see SetPixelFormat
|
style |= WS_CLIPSIBLINGS | WS_CLIPCHILDREN; // see SetPixelFormat
|
||||||
#else
|
#else
|
||||||
style |= WS_CLIPSIBLINGS | WS_CLIPCHILDREN ;
|
style |= WS_CLIPSIBLINGS | WS_CLIPCHILDREN ;
|
||||||
#endif
|
#endif
|
||||||
if (topLevel) {
|
if (topLevel) {
|
||||||
if ((type == Qt::Window || dialog || tool)) {
|
if ((type == Qt::Window || dialog || tool)) {
|
||||||
if (!(flags & Qt::FramelessWindowHint)) {
|
if (!(flags & Qt::FramelessWindowHint)) {
|
||||||
style |= WS_POPUP;
|
style |= WS_POPUP;
|
||||||
if (flags & Qt::MSWindowsFixedSizeDialogHint) {
|
if (flags & Qt::MSWindowsFixedSizeDialogHint) {
|
||||||
style |= WS_DLGFRAME;
|
style |= WS_DLGFRAME;
|
||||||
} else {
|
} else {
|
||||||
style |= WS_THICKFRAME;
|
style |= WS_THICKFRAME;
|
||||||
}
|
|
||||||
if (flags & Qt::WindowTitleHint)
|
|
||||||
style |= WS_CAPTION; // Contains WS_DLGFRAME
|
|
||||||
}
|
}
|
||||||
if (flags & Qt::WindowSystemMenuHint)
|
if (flags & Qt::WindowTitleHint)
|
||||||
style |= WS_SYSMENU;
|
style |= WS_CAPTION; // Contains WS_DLGFRAME
|
||||||
else if (dialog && (flags & Qt::WindowCloseButtonHint) && !(flags & Qt::FramelessWindowHint)) {
|
|
||||||
style |= WS_SYSMENU | WS_BORDER; // QTBUG-2027, dialogs without system menu.
|
|
||||||
exStyle |= WS_EX_DLGMODALFRAME;
|
|
||||||
}
|
|
||||||
const bool showMinimizeButton = flags & Qt::WindowMinimizeButtonHint;
|
|
||||||
if (showMinimizeButton)
|
|
||||||
style |= WS_MINIMIZEBOX;
|
|
||||||
const bool showMaximizeButton = shouldShowMaximizeButton(w, flags);
|
|
||||||
if (showMaximizeButton)
|
|
||||||
style |= WS_MAXIMIZEBOX;
|
|
||||||
if (showMinimizeButton || showMaximizeButton)
|
|
||||||
style |= WS_SYSMENU;
|
|
||||||
if (tool)
|
|
||||||
exStyle |= WS_EX_TOOLWINDOW;
|
|
||||||
if ((flags & Qt::WindowContextHelpButtonHint) && !showMinimizeButton
|
|
||||||
&& !showMaximizeButton)
|
|
||||||
exStyle |= WS_EX_CONTEXTHELP;
|
|
||||||
} else {
|
|
||||||
exStyle |= WS_EX_TOOLWINDOW;
|
|
||||||
}
|
}
|
||||||
|
if (flags & Qt::WindowSystemMenuHint)
|
||||||
|
style |= WS_SYSMENU;
|
||||||
|
else if (dialog && (flags & Qt::WindowCloseButtonHint) && !(flags & Qt::FramelessWindowHint)) {
|
||||||
|
style |= WS_SYSMENU | WS_BORDER; // QTBUG-2027, dialogs without system menu.
|
||||||
|
exStyle |= WS_EX_DLGMODALFRAME;
|
||||||
|
}
|
||||||
|
const bool showMinimizeButton = flags & Qt::WindowMinimizeButtonHint;
|
||||||
|
if (showMinimizeButton)
|
||||||
|
style |= WS_MINIMIZEBOX;
|
||||||
|
const bool showMaximizeButton = shouldShowMaximizeButton(w, flags);
|
||||||
|
if (showMaximizeButton)
|
||||||
|
style |= WS_MAXIMIZEBOX;
|
||||||
|
if (showMinimizeButton || showMaximizeButton)
|
||||||
|
style |= WS_SYSMENU;
|
||||||
|
if (tool)
|
||||||
|
exStyle |= WS_EX_TOOLWINDOW;
|
||||||
|
if ((flags & Qt::WindowContextHelpButtonHint) && !showMinimizeButton
|
||||||
|
&& !showMaximizeButton)
|
||||||
|
exStyle |= WS_EX_CONTEXTHELP;
|
||||||
|
} else {
|
||||||
|
exStyle |= WS_EX_TOOLWINDOW;
|
||||||
|
}
|
||||||
|
|
||||||
// make mouse events fall through this window
|
// make mouse events fall through this window
|
||||||
// NOTE: WS_EX_TRANSPARENT flag can make mouse inputs fall through a layered window
|
// NOTE: WS_EX_TRANSPARENT flag can make mouse inputs fall through a layered window
|
||||||
if (flagsIn & Qt::WindowTransparentForInput)
|
if (flagsIn & Qt::WindowTransparentForInput)
|
||||||
exStyle |= WS_EX_LAYERED | WS_EX_TRANSPARENT;
|
exStyle |= WS_EX_LAYERED | WS_EX_TRANSPARENT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user