The DWM workaround is not needed when DWM composition is disabled
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
This commit is contained in:
parent
9904a5077a
commit
c3c5ef0d5d
|
@ -376,7 +376,8 @@ bool FramelessHelperWin::nativeEventFilter(const QByteArray &eventType, void *me
|
||||||
// is not correct. It confuses QPA's internal logic.
|
// is not correct. It confuses QPA's internal logic.
|
||||||
clientRect->bottom += 1;
|
clientRect->bottom += 1;
|
||||||
#endif
|
#endif
|
||||||
// Dirty hack to workaround the DWM flicker.
|
if (Utilities::isDwmCompositionAvailable()) {
|
||||||
|
// Dirty hack to workaround the resize flicker caused by DWM.
|
||||||
LARGE_INTEGER freq = {};
|
LARGE_INTEGER freq = {};
|
||||||
if (QueryPerformanceFrequency(&freq) == FALSE) {
|
if (QueryPerformanceFrequency(&freq) == FALSE) {
|
||||||
qWarning() << Utilities::getSystemErrorMessage(QStringLiteral("QueryPerformanceFrequency"));
|
qWarning() << Utilities::getSystemErrorMessage(QStringLiteral("QueryPerformanceFrequency"));
|
||||||
|
@ -433,6 +434,7 @@ bool FramelessHelperWin::nativeEventFilter(const QByteArray &eventType, void *me
|
||||||
qWarning() << "timeEndPeriod() failed.";
|
qWarning() << "timeEndPeriod() failed.";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// We cannot return WVR_REDRAW otherwise Windows exhibits bugs where
|
// We cannot return WVR_REDRAW otherwise Windows exhibits bugs where
|
||||||
// client pixels and child windows are mispositioned by the width/height
|
// client pixels and child windows are mispositioned by the width/height
|
||||||
// of the upper-left nonclient area.
|
// of the upper-left nonclient area.
|
||||||
|
|
Loading…
Reference in New Issue