Skip to content

Commit

Permalink
Fix #42, #49
Browse files Browse the repository at this point in the history
* Use ACCENT_ENABLE_BLURBEHIND in Windows10 1903 environment
  • Loading branch information
sourcechord committed May 31, 2019
1 parent 5c0f8f2 commit 637ea17
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion FluentWPF/Utility/AcrylicHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,12 @@ internal static void EnableBlur(IntPtr hwnd, AccentFlagsType style = AccentFlags
// ウィンドウ背景のぼかしを行うのはWindows10の場合のみ
// OSのバージョンに従い、AccentStateを切り替える
var currentVersion = SystemInfo.Version.Value;
if (currentVersion >= VersionInfos.Windows10_1809)
if (currentVersion == VersionInfos.Windows10_1903)
{
// Windows10 1903では、ACCENT_ENABLE_ACRYLICBLURBEHINDを用いると、ウィンドウのドラッグ移動などでマウス操作に追従しなくなる。
accent.AccentState = AccentState.ACCENT_ENABLE_BLURBEHIND;
}
else if (currentVersion >= VersionInfos.Windows10_1809)
{
accent.AccentState = AccentState.ACCENT_ENABLE_ACRYLICBLURBEHIND;
}
Expand Down
1 change: 1 addition & 0 deletions FluentWPF/Utility/VersionInfos.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@ sealed class VersionInfos
public static VersionInfo Windows10_1709 { get { return new VersionInfo(10, 0, 16299); } }
public static VersionInfo Windows10_1803 { get { return new VersionInfo(10, 0, 17134); } }
public static VersionInfo Windows10_1809 { get { return new VersionInfo(10, 0, 17763); } }
public static VersionInfo Windows10_1903 { get { return new VersionInfo(10, 0, 18362); } }
}
}

0 comments on commit 637ea17

Please sign in to comment.