MCPcopy
hub / github.com/oklai/koala / onMinimize

Function onMinimize

src/app/scripts/windowEvents.js:33–51  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

31
32// window minimize event
33function onMinimize () {
34 // always keep tray
35 if (process.platform === 'darwin' && tray) {
36 return false;
37 }
38
39 var trayIcon = process.platform === 'darwin' ? appPackage.window['icon-mac'] : appPackage.window.icon;
40 tray = new nw.Tray({icon: trayIcon});
41 tray.menu = trayMenu;
42 tray.on('click', function () {
43 mainWindow.show();
44
45 // always keep tray
46 if (process.platform === 'darwin') return false;
47
48 this.remove();
49 tray = null;
50 });
51}
52// window restore event
53function onRestore () {
54 // always keep tray

Callers 1

windowEvents.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected