Re:Electron 3.0.0
by brazzledazzle on Tuesday September 18, 2018 @09:22PM
(#18020900)
I’m guessing they meant visibility (which minimizing can effect) but it depends on what they mean by “background”. Sounds like that’s only reliably available on macOS:
“Additionally, on macOS, the visibility state also tracks the window occlusion state. If the window is occluded (i.e. fully covered) by another window, the visibility state will be hidden. On other platforms, the visibility state will be hidden only when the window is minimized or explicitly hidden with win.hide().”
That doesn't even seem correct - the BrowserWindow emits "hide" and "show" events [1] that Slack could use to do exactly what you're describing. I'm guessing they just don't want to implement it for some reason?
[1] https://electronjs.org/docs/api/browser-window#event-show