Electron: Can't hide program icon in BrowserWindow

I am trying to hide the program icon on the windowbar of a electron window. I have created the BrowserWindow as follows:

let win = new BrowserWindow({width: 420, height: 640, resizable: false, backgroundColor: '#fff', icon: null});

This however does not hide the icon and still shows the default program icon. How can I hide the program icon in electron?

Upvotes: 1

Views: 3979

Answers (1)

Hai Pham
Hai Pham

Reputation: 2225

Try this:

let win = new BrowserWindow({width: 420, height: 640, resizable: false, backgroundColor: '#fff', icon: null});
win.setSkipTaskbar(true);

API's document goes here: https://electronjs.org/docs/api/browser-window#winsetskiptaskbarskip

Upvotes: 3

Related Questions