We have an electron app running on X11 without a Window Manager -> directly on the XServer.
We can't get electron to get in fullscreen!
main.js
const { app, BrowserWindow } = require('electron')
let win;
function createWindow () {
    // Create the browser window.
    win = new BrowserWindow({
        width: 400,
        height: 300,
        backgroundColor: '#ffffff',
        fullscreen:true,
        "web-preferences": { "web-security": false }
        //icon: `file://${__dirname}/dist/assets/logo.png`
    })
    win.loadFile(`app/index.html`)
    //// uncomment below to open the DevTools.
    win.webContents.openDevTools()
    // Event when the window is closed.
    win.on('closed', function () {
        win = null
    })
}
// Create window on electron intialization
app.on('ready', createWindow)
We also tried using setFullscreen, nothing works.
The xserver uses the whole screen, so there's no problem with it. Chromium started in fullscreen - no problems.

If we start Electron with an Window Manager, we can press F11 afterwards to make it full size but still doesn't work programmaticly
We tried:
This might not be what you want but there is a option called kiosk this is basically fullscreen mode exept the page covers the entire screen. Also you can't escape from it until kiosk mode is turned off.
To activate you can either call setKiosk(true). Or set kiosk: true in the browser window options
setKiosk Docs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With