mirror of
https://github.com/microsoft/PowerToys
synced 2025-08-31 22:45:32 +00:00
[PTRun]Don't apply transparency fix after theme change on Windows 10 (#33783)
This commit is contained in:
@@ -1014,7 +1014,12 @@ namespace PowerLauncher.ViewModel
|
|||||||
// https://github.com/lepoco/wpfui/blob/303f0aefcd59a142bc681415dc4360a34a15f33d/src/Wpf.Ui/Controls/Window/WindowBackdrop.cs#L280
|
// 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
|
// 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;
|
var window = Application.Current.MainWindow;
|
||||||
|
|
||||||
|
// Only makes sense for Windows 11 or greater, since Windows 10 doesn't have Mica.
|
||||||
|
if (OSVersionHelper.IsWindows11())
|
||||||
|
{
|
||||||
Wpf.Ui.Controls.WindowBackdrop.RemoveBackground(window);
|
Wpf.Ui.Controls.WindowBackdrop.RemoveBackground(window);
|
||||||
|
}
|
||||||
|
|
||||||
// Setting uint titlebarPvAttribute = 0xFFFFFFFE; works on 22H2 or higher, 21H2 (aka SV1) this value causes a crash
|
// Setting uint titlebarPvAttribute = 0xFFFFFFFE; works on 22H2 or higher, 21H2 (aka SV1) this value causes a crash
|
||||||
if (OSVersionHelper.IsGreaterThanWindows11_21H2())
|
if (OSVersionHelper.IsGreaterThanWindows11_21H2())
|
||||||
|
Reference in New Issue
Block a user