summaryrefslogtreecommitdiffstats
path: root/src/widgets/dialogs/qwizard_win.cpp
diff options
context:
space:
mode:
authorYuhang Zhao <2546789017@qq.com>2021-10-30 22:12:11 +0800
committerYuhang Zhao <2546789017@qq.com>2021-11-02 03:15:17 +0800
commit2962e27441c3870120a0d37cd7dc472953b356e7 (patch)
tree09580ff3126b1ea28f1d5f2774c79a25e793ec72 /src/widgets/dialogs/qwizard_win.cpp
parent859f2ca1a6eeddafd0d346a5716f84a9df1acbdc (diff)
qtbase: remove last piece of DwmIsCompositionEnabled
DWM composition is always enabled and can't be disabled since Windows 8 [1]. As a drive-by, remove an old workaround for MSVC 2012, which is not supported by Qt6. [1] https://docs.microsoft.com/en-us/windows/win32/api/dwmapi/nf-dwmapi-dwmiscompositionenabled Change-Id: I2ec055d794c91d69c141dca7cec80beb9468628c Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Diffstat (limited to 'src/widgets/dialogs/qwizard_win.cpp')
-rw-r--r--src/widgets/dialogs/qwizard_win.cpp22
1 files changed, 2 insertions, 20 deletions
diff --git a/src/widgets/dialogs/qwizard_win.cpp b/src/widgets/dialogs/qwizard_win.cpp
index 24aa24de20..de180adba1 100644
--- a/src/widgets/dialogs/qwizard_win.cpp
+++ b/src/widgets/dialogs/qwizard_win.cpp
@@ -187,8 +187,7 @@ void QVistaHelper::updateCustomMargins(bool vistaMargins)
bool QVistaHelper::isCompositionEnabled()
{
- BOOL bEnabled;
- return SUCCEEDED(DwmIsCompositionEnabled(&bEnabled)) && bEnabled;
+ return true;
}
bool QVistaHelper::isThemeActive()
@@ -669,26 +668,9 @@ bool QVistaHelper::drawBlackRect(const QRect &rect, HDC hdc)
return value;
}
-#ifndef Q_CC_MSVC
-static inline int getWindowBottomMargin()
-{
- return GetSystemMetrics(SM_CYSIZEFRAME);
-}
-#else
-// QTBUG-36192, GetSystemMetrics(SM_CYSIZEFRAME) returns bogus values
-// for MSVC2012 which leads to the custom margin having no effect since
-// that only works when removing the entire margin.
-static inline int getWindowBottomMargin()
-{
- RECT rect = {0, 0, 0, 0};
- AdjustWindowRectEx(&rect, WS_POPUP | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_THICKFRAME | WS_DLGFRAME, FALSE, 0);
- return qAbs(rect.bottom);
-}
-#endif // Q_CC_MSVC
-
int QVistaHelper::frameSizeDp()
{
- return getWindowBottomMargin();
+ return GetSystemMetrics(SM_CYSIZEFRAME);
}
int QVistaHelper::captionSizeDp()