I'm working on a desktop app that needs to have all of its windows always in full screen, I don't want the user to be able to exit to window mode. I already searched for it but didn't find anything, any ideas? Also, can I prevent the user from opening DevTools and that sort of stuff (things coming from chromium and electron by default)?
You probably want to use kiosk mode for you main window, and also disable the DevTools.
Please refer to the new BrowserWindow() documentation:
options
Object (optional)
kiosk
Boolean (optional) - Whether the window is in kiosk mode. Default isfalse
.
webPreferences
Object (optional) - Settings of web page's features.
devTools
Boolean (optional) - Whether to enable DevTools. If it is set tofalse
, can not useBrowserWindow.webContents.openDevTools()
to open DevTools. Default istrue
.
Adding these settings should work, you may want to give it a try:
mainWindow = new BrowserWindow
(
{
// [...]
kiosk: true,
webPreferences:
{
// [...]
devTools: false
}
}
);