-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tray Icon in Linux Automatically Disappears #13130
Comments
can you test a minimal sample? If it still happens, please upload your sample here for some of us to double-check. |
ok i will give you a sample repo |
Here is the minimal sample. In this sample also the tray icon disapears. |
Okay I tried your sample on my windows machine. I guess I know what happens here. If the user closes the last window, the App thinks it should shut down. However, in your case it is not what you want. So try to add this line and check if it helps in your situation: public override void OnFrameworkInitializationCompleted()
{
if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
{
+ desktop.ShutdownMode = ShutdownMode.OnExplicitShutdown;
_contex = DataContext as ApplicationViewModel;
//other code
}
base.OnFrameworkInitializationCompleted();
} |
I already added it in program.cs file public static void Main(string[] args) Actually my application doesn't shut down on window close. The application will run in the background even after the icon disapers from the system tray . |
okay got it. We will investigate further. |
Ok. Thank you |
Hi, Is there any update. |
No, that issue has not high priority. So don't expect us to fix it in the next few days. If you need urgend support, we offer paid support. |
Any Updates on This ? |
@dsigninfinnium see comment above |
I had similar issue on Windows, However, I suggest, it should be handled somehow by Avalonia devs, because such system behaviour doesn't feels good. |
We cannot handle every scenario reliable in any way, so this is the way to go. I think it's a fair solution. Thanks for your understanding. |
I also experience this problem on Linux. The icon disappears if I suspend the current session and then resume/login again. Adding My app also runs in the background without any open windows. |
Any update on this? |
@aw3-1337 if you have an idea where this is happening, a PR would be welcome, since you can reproduce. |
tray icon in linux system automatically Disappears , starting of the program there is no issue after some time of work it will happen , i tested this issue in various ubuntu versions and there is no error log ( in apps exception log and linux syslog)
The text was updated successfully, but these errors were encountered: