When I launch my Window or singleApplicationWindow...
# compose-desktop
j
When I launch my Window or singleApplicationWindow, it opens a new tray icon. Can I have the main icon be used?
I don't mean 'Icon' per say, but my other native applications only have a single tray spot, but my app takes 2 spots (the launch icon, and the open app)
i
What you mean by tray icon? The icon in the Taskbar/Dock or the icon in the statusbar/tray? If you don't use
Tray
there is no icon in statusbar/tray And what is your OS?
j
Taskbar/Dock. This occurs on Linux and Mac. Windows switches the icon from the gradle defined icon to the "Window" defined icon
i
On Windows you have to set icon explicitly via
Window(icon=
argument
You can place the icon in
resources
folder and use it for every
Window(icon=
in your application and in
build.gradle
j
It's not the 'icon' but the tray presence
when I click the tray icon, it opens a second tray item that represents my window
when I click a non-opened chrome, it takes over the same item, and if I open a second instance, it reflects that my item has two windows under the original icon
i
You mean, when you pin your application to the Dock/Taskbar, and open it for the first time, you have two "icons" instead of one? On my Windows/macOs everything is fine if you pin the application created by native distribution
j
This is what I get on linux
i
This looks like a bug 🤔. Either in compose native distribution, on in jpackage which we use. Can you create an issue in https://github.com/JetBrains/compose-jb/issues with the video above? Don't promise that we will fix it fast, as probably the bug in jpackage in JDK. By the way, try the latest OpenJDK 16, when you create the package. Maybe even OpenJDK 17 EAP
j
I was using OpenJDK 15, so I changed to 16, same behavior
I'll try 17 next