I will in a very near future submit a patch against the 1.8.0 branch for xulrunner adding a <systrayicon/> element to the toolkit. The patch will offer that for Win32 only at this time. This element offers three methods:

minimizeWindowToTray()
minimizeAllWindowsToTray();
restoreFromTray();

I guess no explanation is needed here. The element will accept the following attributes:

  • context will contain the id of a popup element. If this attribute is present on the element, a context click on the tray icon will show the popup above the systray.
  • tooltiptext ; this one is hard to understand... If absent, the default will be the title of the xul window that minimized to tray.
  • most common event handler attributes

In addition, a few new attributes will be available on the root element (window for instance) indicating if the normal minimization should minimize to tray or not, if closing the application should in fact minimize to tray or really close, and the number of clicks on the systray icon needed to restore the window(s).

Stay tuned.