mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-04 18:26:39 +02:00
[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:
@@ -123,6 +123,20 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
||||
}
|
||||
}
|
||||
|
||||
public bool CloseAfterLosingFocus
|
||||
{
|
||||
get => _peekSettings.Properties.CloseAfterLosingFocus.Value;
|
||||
set
|
||||
{
|
||||
if (_peekSettings.Properties.CloseAfterLosingFocus.Value != value)
|
||||
{
|
||||
_peekSettings.Properties.CloseAfterLosingFocus.Value = value;
|
||||
OnPropertyChanged(nameof(CloseAfterLosingFocus));
|
||||
NotifySettingsChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void NotifySettingsChanged()
|
||||
{
|
||||
// Using InvariantCulture as this is an IPC message
|
||||
|
||||
Reference in New Issue
Block a user