Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-swt-dev] Multiple tray icons in Windows 10

Hi All,

I know that this is not a forum for general issue discussion.

But i posted my question over multiple forums from stack overflow to msdn to Eclipse forums. I have either got no reply or irrelevant ones.

So would like to ask my question over this list and seek your guidance on the issue

We have been using SWT as our frontend UI in standalone mode for our desktop based client available both in Windows and Mac flavors.

We use SWT's tray item to contribute a tray icon along with a menu. Below is how we are using it

1. When the application starts we create an instance of the tray item and set an initial image.
2. During the life cycle of application according to our status of application we keep calling setImage on the same instance of the tray item.
3. One point to note is we load the image from our file system every time we don't have any image cache.

This was working fine before Windows 10. But Windows 10 produces multiple icons with our scenarios. But only icon is active one or has a menu. As time progresses the whole notification area fills up with icons and our application becomes unusable.

I checked that SWT internally uses Windows Shell SDK's Shell_NotifyIcon() APIs.
Below is the precise code from OS class

public static final boolean Shell_NotifyIcon (int dwMessage, NOTIFYICONDATA lpData) {
if (IsUnicode) return Shell_NotifyIconW (dwMessage, (NOTIFYICONDATAW)lpData);
return Shell_NotifyIconA (dwMessage, (NOTIFYICONDATAA)lpData);
}

So, i concluded that calls with OS.NIM_ADD is only called once during my application initialization and OS.NIM_MODIFY subsequently.

Does anyone have any hints on this issue or how can i progress with this ?

Is there any internal tracing/logging for SWT running in standalone mode that i can enable ? Can SWT write to windows event logs ? Are there any Windows Shell SDK logs which i can trace to find out on who is contributing the icons ?

Questions which i have already posted across the forums

https://www.eclipse.org/forums/index.php/t/1074333/

https://social.msdn.microsoft.com/Forums/en-US/07be522c-2ee0-46d3-adff-58de137142d4/shellnotifyiconw-producing-multiple-icons-in-windows-10?forum=windowsgeneraldevelopmentissues


Thanks in advance.
Best Regards,
Saurav



Back to the top