diff --git a/include/FramelessHelper/Core/framelesshelpercore_global.h b/include/FramelessHelper/Core/framelesshelpercore_global.h index 25fba39..96cbf12 100644 --- a/include/FramelessHelper/Core/framelesshelpercore_global.h +++ b/include/FramelessHelper/Core/framelesshelpercore_global.h @@ -269,7 +269,8 @@ enum class Option CenterWindowBeforeShow = 5, EnableBlurBehindWindow = 6, ForceNonNativeBackgroundBlur = 7, - DisableLazyInitializationForMicaMaterial = 8 + DisableLazyInitializationForMicaMaterial = 8, + ForceNativeBackgroundBlur = 9 }; Q_ENUM_NS(Option) diff --git a/src/core/framelessconfig.cpp b/src/core/framelessconfig.cpp index 6103b74..093da49 100644 --- a/src/core/framelessconfig.cpp +++ b/src/core/framelessconfig.cpp @@ -72,7 +72,9 @@ static const struct {FRAMELESSHELPER_BYTEARRAY_LITERAL("FRAMELESSHELPER_FORCE_NON_NATIVE_BACKGROUND_BLUR"), FRAMELESSHELPER_BYTEARRAY_LITERAL("Options/ForceNonNativeBackgroundBlur")}, {FRAMELESSHELPER_BYTEARRAY_LITERAL("FRAMELESSHELPER_DISABLE_LAZY_INITIALIZATION_FOR_MICA_MATERIAL"), - FRAMELESSHELPER_BYTEARRAY_LITERAL("Options/DisableLazyInitializationForMicaMaterial")} + FRAMELESSHELPER_BYTEARRAY_LITERAL("Options/DisableLazyInitializationForMicaMaterial")}, + {FRAMELESSHELPER_BYTEARRAY_LITERAL("FRAMELESSHELPER_FORCE_NATIVE_BACKGROUND_BLUR"), + FRAMELESSHELPER_BYTEARRAY_LITERAL("Options/ForceNativeBackgroundBlur")} }; static constexpr const auto OptionCount = std::size(OptionsTable); @@ -107,6 +109,12 @@ static inline void warnInappropriateOptions() WARNING << "Option::DisableWindowsSnapLayout is only available on Windows."; } #endif // Q_OS_WINDOWS + if (cfg->isSet(Option::ForceHideWindowFrameBorder) && cfg->isSet(Option::ForceShowWindowFrameBorder)) { + WARNING << "Option::ForceHideWindowFrameBorder and Option::ForceShowWindowFrameBorder can't be both enabled."; + } + if (cfg->isSet(Option::ForceNonNativeBackgroundBlur) && cfg->isSet(Option::ForceNativeBackgroundBlur)) { + WARNING << "Option::ForceNonNativeBackgroundBlur and Option::ForceNativeBackgroundBlur can't be both enabled."; + } if (cfg->isSet(Option::WindowUseRoundCorners)) { WARNING << "Option::WindowUseRoundCorners has not been implemented yet."; } diff --git a/src/core/utils_linux.cpp b/src/core/utils_linux.cpp index ce5bc8c..a049445 100644 --- a/src/core/utils_linux.cpp +++ b/src/core/utils_linux.cpp @@ -530,6 +530,9 @@ WallpaperAspectStyle Utils::getWallpaperAspectStyle() bool Utils::isBlurBehindWindowSupported() { static const auto result = []() -> bool { + if (FramelessConfig::instance()->isSet(Option::ForceNativeBackgroundBlur)) { + return true; + } if (FramelessConfig::instance()->isSet(Option::ForceNonNativeBackgroundBlur)) { return false; } diff --git a/src/core/utils_win.cpp b/src/core/utils_win.cpp index 34ae1cc..625eec8 100644 --- a/src/core/utils_win.cpp +++ b/src/core/utils_win.cpp @@ -1968,6 +1968,9 @@ WallpaperAspectStyle Utils::getWallpaperAspectStyle() bool Utils::isBlurBehindWindowSupported() { static const auto result = []() -> bool { + if (FramelessConfig::instance()->isSet(Option::ForceNativeBackgroundBlur)) { + return true; + } if (FramelessConfig::instance()->isSet(Option::ForceNonNativeBackgroundBlur)) { return false; }