From 21774f9fbcbb26d2d26fb192a093c8ac80fba722 Mon Sep 17 00:00:00 2001 From: Yuhang Zhao <2546789017@qq.com> Date: Thu, 11 Mar 2021 09:20:09 +0800 Subject: [PATCH] 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> --- framelesshelper_win32.cpp | 2 ++ framelessquickhelper.cpp | 2 ++ qtacrylicwidget.cpp | 2 ++ 3 files changed, 6 insertions(+) diff --git a/framelesshelper_win32.cpp b/framelesshelper_win32.cpp index c2e19ac..e58e9ef 100644 --- a/framelesshelper_win32.cpp +++ b/framelesshelper_win32.cpp @@ -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; } diff --git a/framelessquickhelper.cpp b/framelessquickhelper.cpp index d45c4ff..b5abf15 100644 --- a/framelessquickhelper.cpp +++ b/framelessquickhelper.cpp @@ -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); } diff --git a/qtacrylicwidget.cpp b/qtacrylicwidget.cpp index 2f608b9..e81e948 100644 --- a/qtacrylicwidget.cpp +++ b/qtacrylicwidget.cpp @@ -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);