diff --git a/framelesshelper_global.h b/framelesshelper_global.h index 48c99f2..9608bb8 100644 --- a/framelesshelper_global.h +++ b/framelesshelper_global.h @@ -68,6 +68,7 @@ namespace _flh_global { [[maybe_unused]] const char _flh_acrylic_blurEnabled_flag[] = "_FRAMELESSHELPER_BLUR_ENABLED"; [[maybe_unused]] const char _flh_acrylic_blurMode_flag[] = "_FRAMELESSHELPER_BLUR_MODE"; [[maybe_unused]] const char _flh_acrylic_gradientColor_flag[] = "_FRAMELESSHELPER_BLUR_GRADIENT_COLOR"; +[[maybe_unused]] const char _flh_acrylic_disableExtraProcess[] = "_FRAMELESSHELPER_DISABLE_EXTRA_PROCESS_FOR_BLUR"; [[maybe_unused]] const char _flh_acrylic_forceEnableOfficialMSWin10AcrylicBlur_flag[] = "_FRAMELESSHELPER_FORCE_ENABLE_MSWIN10_OFFICIAL_ACRYLIC_BLUR"; [[maybe_unused]] const char _flh_acrylic_forceEnableTraditionalBlur_flag[] = "_FRAMELESSHELPER_FORCE_ENABLE_TRADITIONAL_BLUR"; [[maybe_unused]] const char _flh_acrylic_forceDisableWallpaperBlur_flag[] = "_FRAMELESSHELPER_FORCE_DISABLE_WALLPAPER_BLUR"; diff --git a/qtacryliceffecthelper.cpp b/qtacryliceffecthelper.cpp index fe1a094..50acc9b 100644 --- a/qtacryliceffecthelper.cpp +++ b/qtacryliceffecthelper.cpp @@ -206,6 +206,11 @@ void QtAcrylicEffectHelper::paintBackground(QPainter *painter, const QRect &rect if (!checkWindow()) { return; } + // TODO: should we limit it to Win32 only? Or should we do something about the + // acrylic brush instead? + if (qEnvironmentVariableIsSet(_flh_global::_flh_acrylic_disableExtraProcess)) { + return; + } if (Utilities::shouldUseTraditionalBlur()) { const QPainter::CompositionMode mode = painter->compositionMode(); painter->setCompositionMode(QPainter::CompositionMode_Clear);