Skip to content

Commit

Permalink
Revert "Fix: Global search doesn't work immediately after clicking aw…
Browse files Browse the repository at this point in the history
…ay to main Playnite window #3072"

This reverts commit ab4f0ba.
  • Loading branch information
JosefNemec committed Nov 10, 2022
1 parent b5db553 commit 937cd39
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions source/Playnite.DesktopApp/Windows/SearchWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
<i:EventTrigger EventName="Closed" >
<i:InvokeCommandAction Command="{Binding WindowClosedCommand}" />
</i:EventTrigger>
<i:EventTrigger EventName="LostKeyboardFocus" >
<i:InvokeCommandAction Command="{Binding WindowLostKeyboardFocusCommand}" />
<i:EventTrigger EventName="Deactivated" >
<i:InvokeCommandAction Command="{Binding WindowDeactivatedCommand}" />
</i:EventTrigger>
</i:Interaction.Triggers>

Expand Down
4 changes: 2 additions & 2 deletions source/Playnite/ViewModels/SearchViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ public string SearchTerm
public RelayCommand<KeyEventArgs> TextBoxKeyDownCommand => new RelayCommand<KeyEventArgs>((keyArgs) => TextBoxKeyDown(keyArgs));
public RelayCommand<KeyEventArgs> TextBoxKeyUpCommand => new RelayCommand<KeyEventArgs>((keyArgs) => TextBoxKeyUp(keyArgs));
public RelayCommand<EventArgs> WindowClosedCommand => new RelayCommand<EventArgs>((_) => WindowClosed(_));
public RelayCommand<EventArgs> WindowLostKeyboardFocusCommand => new RelayCommand<EventArgs>((_) => WindowLostKeyboardFocus(_));
public RelayCommand<EventArgs> WindowDeactivatedCommand => new RelayCommand<EventArgs>((_) => WindowDeactivated(_));
public RelayCommand ToggleHintCommand => new RelayCommand(() => ToggleHint());
public RelayCommand OpenSearchSettingsCommand => new RelayCommand(() => OpenSearchSettings());
public RelayCommand DeactiveCurrentContextCommand => new RelayCommand(() => DeactiveCurrentContext());
Expand Down Expand Up @@ -557,7 +557,7 @@ public void Close()
window.Close();
}

private void WindowLostKeyboardFocus(EventArgs args)
private void WindowDeactivated(EventArgs args)
{
// The view would get automatically closed once you switch to debugger...
if (Debugger.IsAttached)
Expand Down

0 comments on commit 937cd39

Please sign in to comment.