mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-08 04:07:40 +02:00
Added fix for closing wox on pressing escape and app execution (#75)
This commit is contained in:
committed by
GitHub
parent
0648ecf2d2
commit
9d1b8fbd3e
@@ -28,4 +28,7 @@
|
|||||||
Visibility="{Binding MainWindowVisibility, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
Visibility="{Binding MainWindowVisibility, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||||
d:DataContext="{d:DesignInstance vm:MainViewModel}">
|
d:DataContext="{d:DesignInstance vm:MainViewModel}">
|
||||||
<xaml:WindowsXamlHost InitialTypeName="PowerLauncher.UI.LauncherControl" ChildChanged="WindowsXamlHost_ChildChanged" />
|
<xaml:WindowsXamlHost InitialTypeName="PowerLauncher.UI.LauncherControl" ChildChanged="WindowsXamlHost_ChildChanged" />
|
||||||
|
<Window.InputBindings>
|
||||||
|
<KeyBinding Key="Escape" Command="{Binding EscCommand}"></KeyBinding>
|
||||||
|
</Window.InputBindings>
|
||||||
</Window>
|
</Window>
|
||||||
|
|||||||
@@ -287,7 +287,11 @@ namespace PowerLauncher
|
|||||||
if (args != null && args.ChosenSuggestion != null)
|
if (args != null && args.ChosenSuggestion != null)
|
||||||
{
|
{
|
||||||
ResultViewModel result = (ResultViewModel)args.ChosenSuggestion;
|
ResultViewModel result = (ResultViewModel)args.ChosenSuggestion;
|
||||||
_ = result.Result.Action != null && result.Result.Action(new ActionContext { });
|
if (result != null)
|
||||||
|
{
|
||||||
|
_viewModel.Results.SelectedItem = result;
|
||||||
|
_viewModel.OpenResultCommand.Execute(null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user