[macOS] amend: Child window visibility handling

https://github.com/2dust/v2rayN/pull/6596

When the main window is hidden, open child windows are mistakenly hidden as well.
This prevents reopening child windows after the main window is shown again.
This commit is contained in:
ShiinaRinne 2025-01-29 23:30:02 +08:00
parent f71125d8f3
commit 783f87b5c6

View file

@ -390,7 +390,6 @@ namespace v2rayN.Desktop.Views
StorageUI();
await ViewModel?.MyAppExitAsync(false);
Close();
}
#endregion Event
@ -414,6 +413,10 @@ namespace v2rayN.Desktop.Views
{
if (Utils.IsOSX() || _config.UiItem.Hide2TrayWhenClose)
{
foreach (var ownedWindow in this.OwnedWindows)
{
ownedWindow.Close();
}
this.Hide();
}
else