Disable dynamic switching of Acrylic blur and wallpaper blur

After some testing, it's found that it's not reliable.
Maybe we should use another windows message to do this?
To be investigated.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
This commit is contained in:
Yuhang Zhao 2021-03-11 09:20:09 +08:00
parent c9be4858ec
commit 21774f9fbc
3 changed files with 6 additions and 0 deletions

View File

@ -710,6 +710,7 @@ bool FramelessHelperWin::nativeEventFilter(const QByteArray &eventType, void *me
default:
break;
}
#if 0
// TODO: what if the user want to use the wallpaper blur all the time?
// Add an option to let the user choose what he wants.
if (Utilities::isWin10OrGreater()) {
@ -740,6 +741,7 @@ bool FramelessHelperWin::nativeEventFilter(const QByteArray &eventType, void *me
}
}
}
#endif
return false;
}

View File

@ -143,11 +143,13 @@ void FramelessQuickHelper::timerEvent(QTimerEvent *event)
void FramelessQuickHelper::setBlurEffectEnabled(const bool enabled, const QColor &gradientColor)
{
#if 0
#ifdef Q_OS_WINDOWS
// TODO: let the user choose what he wants.
if (Utilities::isWin10OrGreater()) {
qputenv(_flh_global::_flh_acrylic_forceEnableOfficialMSWin10AcrylicBlur_flag, "True");
}
#endif
#endif
Utilities::setBlurEffectEnabled(window(), enabled, gradientColor);
}

View File

@ -145,11 +145,13 @@ void QtAcrylicWidget::showEvent(QShowEvent *event)
if (!inited) {
const QWindow *win = windowHandle();
FramelessWindowsManager::addWindow(win);
#if 0
#ifdef Q_OS_WINDOWS
// TODO: let the user choose what he wants.
if (Utilities::isWin10OrGreater()) {
qputenv(_flh_global::_flh_acrylic_forceEnableOfficialMSWin10AcrylicBlur_flag, "True");
}
#endif
#endif
Utilities::setBlurEffectEnabled(win, true);
m_acrylicHelper.install(win);