Skip to content

Commit

Permalink
[macOS] amend: Child window visibility handling (#6598)
Browse files Browse the repository at this point in the history
#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.
  • Loading branch information
ShiinaRinne authored Jan 30, 2025
1 parent f71125d commit c0f8b6b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions v2rayN/v2rayN.Desktop/Views/MainWindow.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,6 @@ private async void MenuClose_Click(object? sender, RoutedEventArgs e)
StorageUI();

await ViewModel?.MyAppExitAsync(false);
Close();
}

#endregion Event
Expand All @@ -414,6 +413,10 @@ public void ShowHideWindow(bool? blShow)
{
if (Utils.IsOSX() || _config.UiItem.Hide2TrayWhenClose)
{
foreach (var ownedWindow in this.OwnedWindows)
{
ownedWindow.Close();
}
this.Hide();
}
else
Expand Down Expand Up @@ -492,4 +495,4 @@ private void MenuItem_Click(object? sender, RoutedEventArgs e)

#endregion UI
}
}
}

0 comments on commit c0f8b6b

Please sign in to comment.