Skip to content

Commit

Permalink
修复 搜索框窗口被关闭后无法弹出
Browse files Browse the repository at this point in the history
  • Loading branch information
MakesYT committed May 31, 2024
1 parent c2233d8 commit af8c996
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions KitopiaAvalonia/Windows/SearchWindow.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
SystemDecorations="BorderOnly"
KeyDown="InputElement_OnKeyDown"
Topmost="True"
Closing="Window_OnClosing"
Title="SearchWindow">
<windowing:AppWindow.Resources>
<searchWindow:StarBoolToText x:Key="StarBoolToText" />
Expand Down
6 changes: 6 additions & 0 deletions KitopiaAvalonia/Windows/SearchWindow.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,4 +119,10 @@ private void InputElement_OnKeyDown(object? sender, KeyEventArgs e)
IsVisible = false;
}
}

private void Window_OnClosing(object? sender, WindowClosingEventArgs e)
{
e.Cancel = true;
IsVisible = false;
}
}

0 comments on commit af8c996

Please sign in to comment.