!7 cmodule MinimizeToTray > DynPrintLogAndEnabled { transient bool activating; start { JFrame f = getFrame(dm_desktopPane()); if (f == null) print("No frame found"); else { ownResource(tempOnFrameIconified(f, r { if (!activating) f.setVisible(false) })); print("Minimize to tray installed"); } Runnable rShow = r { activating = true; try { activateFrame(dm_desktopPane()); } finally { activating = false; } }; S name = dm_osName(); dm_systemTrayIcon(dm_osIconID(), name, rShow, "Show " + name, rShow); } bool warnOnDelete() { true; } }