@@ -125,6 +125,12 @@ public static int SetWindowAttribute(IntPtr hwnd, ParameterTypes.DWMWINDOWATTRIB
125125 => DwmSetWindowAttribute ( hwnd , attribute , ref parameter , Marshal . SizeOf < int > ( ) ) ;
126126 }
127127
128+ private bool IsBackdropSupported ( )
129+ {
130+ // Windows 11 (22000) over mica and arcrylic.
131+ return RuntimeInformation . IsOSPlatform ( OSPlatform . Windows ) &&
132+ Environment . OSVersion . Version . Build >= 22000 ;
133+ }
128134 private System . Windows . Window GetMainWindow ( )
129135 {
130136 return Application . Current . Dispatcher . Invoke ( ( ) => Application . Current . MainWindow ) ;
@@ -172,7 +178,7 @@ public void AutoDropShadow()
172178 RemoveDropShadowEffectFromCurrentTheme ( ) ;
173179 if ( _settings . UseDropShadowEffect )
174180 {
175- if ( BlurEnabled )
181+ if ( BlurEnabled && IsBackdropSupported ( ) )
176182 {
177183 SetWindowCornerPreference ( "Round" ) ;
178184 }
@@ -184,7 +190,7 @@ public void AutoDropShadow()
184190 }
185191 else
186192 {
187- if ( BlurEnabled )
193+ if ( BlurEnabled && IsBackdropSupported ( ) )
188194 {
189195 SetWindowCornerPreference ( "Default" ) ;
190196 }
@@ -251,7 +257,7 @@ public void SetBlurForWindow()
251257 _ => 0 // None
252258 } ;
253259
254- if ( BlurEnabled && hasBlur )
260+ if ( BlurEnabled && hasBlur && IsBackdropSupported ( ) )
255261 {
256262 // If the BackdropType is Mica or MicaAlt, set the windowborderstyle's background to transparent
257263 if ( _settings . BackdropType == BackdropTypes . Mica || _settings . BackdropType == BackdropTypes . MicaAlt )
@@ -446,7 +452,9 @@ public void ColorizeWindow(string Mode)
446452 Color selectedBG = useDarkMode ? DarkBG : LightBG ;
447453 ApplyPreviewBackground ( selectedBG ) ;
448454
449- if ( ! hasBlur )
455+ bool isBlurAvailable = hasBlur && IsBackdropSupported ( ) ; // Windows 11 미만이면 hasBlur를 강제 false
456+
457+ if ( ! isBlurAvailable )
450458 {
451459 mainWindow . Background = Brushes . Transparent ;
452460 }
@@ -469,17 +477,12 @@ public void ColorizeWindow(string Mode)
469477
470478 public bool IsBlurTheme ( )
471479 {
472- if ( Environment . OSVersion . Version >= new Version ( 6 , 2 ) )
473- {
474- var resource = Application . Current . TryFindResource ( "ThemeBlurEnabled" ) ;
475-
476- if ( resource is bool )
477- return ( bool ) resource ;
478-
480+ if ( ! IsBackdropSupported ( ) ) // Windows 11 미만이면 무조건 false
479481 return false ;
480- }
481482
482- return false ;
483+ var resource = Application . Current . TryFindResource ( "ThemeBlurEnabled" ) ;
484+
485+ return resource is bool b && b ;
483486 }
484487 public string GetSystemBG ( )
485488 {
@@ -536,7 +539,7 @@ public bool ChangeTheme(string theme)
536539 _oldTheme = Path . GetFileNameWithoutExtension ( _oldResource . Source . AbsolutePath ) ;
537540 }
538541
539- BlurEnabled = Win32Helper . IsBlurTheme ( ) ;
542+ BlurEnabled = IsBlurTheme ( ) ;
540543 //if (_settings.UseDropShadowEffect)
541544 // AddDropShadowEffectToCurrentTheme();
542545
0 commit comments