Reputation: 502
I currently working on an electron tray application. For Mac, the electron framework has a function for hiding the app in the dock.
app.dock.hide();
I try to run this on a Windows machine and get an error.
TypeError: Cannot read property 'hide' of undefined
Now I am looking for an equivalent functionality for Windows to hide the app in the taskbar.
Upvotes: 6
Views: 7789
Reputation:
Mac OS X is application-oriented, whereas Windows is window-oriented...
app.dock.hide ()
Is indeed tagged as macOS only.
In order to make the window not show in the taskbar, you can either call:
win.setSkipTaskbar (true);
Or add skipTaskbar
to the options passed to the new BrowserWindow:
{
// ...
skipTaskbar: true,
// ...
}
Upvotes: 17