I’m developing a tray based app using electron and I’ve had an issue with the basic context menu, when I’m in a fullscreen game, I use alt+tab to go to a different window (a browser or any other window), only the window appears but I still see the game instead of the taskbar, to see the taskbar I have to press the windows key, then I right click my app’s tray to open the context menu and nothing happens, then press some taskbar buttons until the taskbar flashes and only then I can open the app’s context menu.
To fix it I thought of using a window instead of the basic context menu, made it work then opened the game, the context menu window was opening but it just wasn’t closing, I tried with window.close()
and even with window.hide()
but nothing was happening. Also had some errors which said that the object (window) was destroyed or something like that but I could still see the window.
Not sure what to do about it, I tried putting the window.close()
in the blur window event and even in an interval which was checking window.isFocused()
every second, but nothing worked.
I’m on Windows 10
1PV1 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.