mirror of
https://github.com/2dust/v2rayN.git
synced 2026-04-16 04:25:45 +00:00
Handle Linux window close requests via tray hide
This commit is contained in:
parent
c57a142b3b
commit
0be2401635
1 changed files with 8 additions and 1 deletions
|
|
@ -282,7 +282,14 @@ public partial class MainWindow : WindowBase<MainWindowViewModel>
|
||||||
{
|
{
|
||||||
case WindowCloseReason.OwnerWindowClosing or WindowCloseReason.WindowClosing:
|
case WindowCloseReason.OwnerWindowClosing or WindowCloseReason.WindowClosing:
|
||||||
e.Cancel = true;
|
e.Cancel = true;
|
||||||
|
if (Utils.IsLinux())
|
||||||
|
{
|
||||||
|
HideToTray();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
ShowHideWindow(false);
|
ShowHideWindow(false);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WindowCloseReason.ApplicationShutdown or WindowCloseReason.OSShutdown:
|
case WindowCloseReason.ApplicationShutdown or WindowCloseReason.OSShutdown:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue