mirror of
https://github.com/2dust/v2rayN.git
synced 2025-04-19 21:52:25 +00:00
[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:
parent
f71125d8f3
commit
783f87b5c6
1 changed files with 5 additions and 2 deletions
|
@ -390,7 +390,6 @@ namespace v2rayN.Desktop.Views
|
||||||
StorageUI();
|
StorageUI();
|
||||||
|
|
||||||
await ViewModel?.MyAppExitAsync(false);
|
await ViewModel?.MyAppExitAsync(false);
|
||||||
Close();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion Event
|
#endregion Event
|
||||||
|
@ -414,6 +413,10 @@ namespace v2rayN.Desktop.Views
|
||||||
{
|
{
|
||||||
if (Utils.IsOSX() || _config.UiItem.Hide2TrayWhenClose)
|
if (Utils.IsOSX() || _config.UiItem.Hide2TrayWhenClose)
|
||||||
{
|
{
|
||||||
|
foreach (var ownedWindow in this.OwnedWindows)
|
||||||
|
{
|
||||||
|
ownedWindow.Close();
|
||||||
|
}
|
||||||
this.Hide();
|
this.Hide();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -492,4 +495,4 @@ namespace v2rayN.Desktop.Views
|
||||||
|
|
||||||
#endregion UI
|
#endregion UI
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue