Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PTRun]Don't apply transparency fix after theme change on Windows 10 #33783

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1014,7 +1014,12 @@ public void ToggleWox()
// https://github.com/lepoco/wpfui/blob/303f0aefcd59a142bc681415dc4360a34a15f33d/src/Wpf.Ui/Controls/Window/WindowBackdrop.cs#L280
// So we set it back with https://github.com/lepoco/wpfui/blob/303f0aefcd59a142bc681415dc4360a34a15f33d/src/Wpf.Ui/Controls/Window/WindowBackdrop.cs#L191
var window = Application.Current.MainWindow;
Wpf.Ui.Controls.WindowBackdrop.RemoveBackground(window);

// Only makes sense for Windows 11 or greater, since Windows 10 doesn't have Mica.
if (OSVersionHelper.IsWindows11())
{
Wpf.Ui.Controls.WindowBackdrop.RemoveBackground(window);
}

// Setting uint titlebarPvAttribute = 0xFFFFFFFE; works on 22H2 or higher, 21H2 (aka SV1) this value causes a crash
if (OSVersionHelper.IsGreaterThanWindows11_21H2())
Expand Down
Loading