I am working on a frameless and fullscreen Electron App.I am initializing a browser window with the following configuration:
let window = new BrowserWindow({
resizable: false,
fullscreen: true,
minimizable: false,
frame: false
})
This works well unless the app opens a link of a PDF file on a new tab(which will create a new child window in electron). Since the BrowserWindow is frameless and fullscreen, the PDF page is also fullscreened and frameless thus closing the child window hard. One way to close it is using ALT + f4 or hovering the window on the taskbar and clicking x after Alt + tab on it's preview on Windows 10.
Note: since it is frameless, I've added my own controls with the help of the ipcRenderer and ipcMain. However, this approach is not feasible on external url of PDFs.
I am using Electron ^12.0.1.
Is there a way to instruct electron to add the default controls on all child windows but still make the main BrowserWindow frameless ?