How to dock an electron application at the top of my screen?

I am working on an electron application and what i would like to do, is ensure that other applications/web browsers are automatically docked beneath the electron app and aren’t hidden behind the toolbar when maximized.

Can anyone help? any help would be much appreciated!

Below is the code i have so far in my index.js:

function createWindow(){
    mainWindow = new BrowserWindow({height: 10, width: 300, frame: false,titleBarStyle: 'none',resizable: false, webPreferences: { nodeIntegration: true, 
      contextIsolation: false }})
    mainWindow.setAlwaysOnTop(true, 'normal') 
app.on('ready', () => {

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.