AvaloniaUI / Avalonia

Develop Desktop, Embedded, Mobile and WebAssembly apps with C# and XAML. The most popular .NET UI client technology
https://avaloniaui.net
MIT License
25.23k stars 2.19k forks source link

TrayIcon not visible on Linux Mint 22 Cinnamon #16650

Open rastla opened 1 month ago

rastla commented 1 month ago

Describe the bug

The TrayIcon icon doesn't show up on Linux Mint 22, but shows up on Windows 10. It just displays the broken/missing image icon: grafik

To Reproduce

I created a new "Avalonia .NET App" via Rider (I installed the templates). Then I added an "Assets" folder and an icon and set it as AvaloniaResource. Then added this code:

<TrayIcon.Icons>
   <TrayIcons>
       <TrayIcon Icon="/Assets/headset_icon_dark.ico">
           <TrayIcon.Menu>
               <NativeMenu>
                   <NativeMenuItem Header="Click me"></NativeMenuItem>
                   <NativeMenuItem Header="Test"></NativeMenuItem>
                   <NativeMenuItemSeparator></NativeMenuItemSeparator>
                   <NativeMenuItem Header="Help"></NativeMenuItem>
               </NativeMenu>
           </TrayIcon.Menu>
       </TrayIcon>
   </TrayIcons>
</TrayIcon.Icons>

However, on my Linux Mint 22 Cinnamon, the Icon doesn't show up. The same code works for Windows 10 however...

Here is an example repo: https://github.com/rastla/AvaloniaTrayIconTest

Expected behavior

No response

Avalonia version

11.1.0

OS

Linux

Additional context

No response

maxkatz6 commented 1 month ago

Can you try nightly builds? I think there were related fixes, cc @jmacato.

rastla commented 1 month ago

Same behaviour on 11.2.999-cibuild0051261-alpha unfortunately

elestedt commented 1 week ago

I have the same issue on Ubuntu 20.04.1 with i3 window manager and i3bar. Avalonia 11.1.3