mirror of
https://github.com/Raphire/Win11Debloat.git
synced 2026-04-03 05:56:25 +00:00
Close app preset menu when main window loses focus
This commit is contained in:
@@ -919,6 +919,11 @@ function Show-MainWindow {
|
||||
}
|
||||
})
|
||||
|
||||
# Close the preset menu when the main window loses focus (e.g., user switches to another app).
|
||||
$window.Add_Deactivated({
|
||||
if ($presetsPopup.IsOpen) { $presetsPopup.IsOpen = $false }
|
||||
})
|
||||
|
||||
# Toggle popup on button click
|
||||
$presetsBtn.Add_Click({
|
||||
$presetsPopup.IsOpen = -not $presetsPopup.IsOpen
|
||||
|
||||
Reference in New Issue
Block a user