[macOS] amend: Child window visibility handling (#6598)

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.
pull/6604/head
ShiinaRinne 2025-01-30 10:12:59 +08:00 committed by GitHub
parent f71125d8f3
commit c0f8b6b84c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 2 deletions

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