[Peek]Add setting to close after losing focus (#26364)

* [Peek] WindowActivationState checks are added for focus and close after losing focus.

* Add setting to activate the behavior

---------

Co-authored-by: Jaime Bernardo <jaime@janeasystems.com>
This commit is contained in:
gokcekantarci
2023-05-30 11:44:58 +03:00
committed by GitHub
parent 9786d08695
commit 0c69e3422c
9 changed files with 162 additions and 0 deletions

View File

@@ -12,12 +12,15 @@ namespace Microsoft.PowerToys.Settings.UI.Library
{
ActivationShortcut = new HotkeySettings(false, true, false, false, 0x20);
AlwaysRunNotElevated = new BoolProperty(true);
CloseAfterLosingFocus = new BoolProperty(false);
}
public HotkeySettings ActivationShortcut { get; set; }
public BoolProperty AlwaysRunNotElevated { get; set; }
public BoolProperty CloseAfterLosingFocus { get; set; }
public override string ToString() => JsonSerializer.Serialize(this);
}
}