Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

130
Visualizações
Docking electron window on top of browsers and other applications

I have asked this question on a number of different forums and have not been able to find a solution. Can ANYONE tell me if this can be done?

When launched my Browserwindow currently sits on top of every other application that's running and is placed at the top of my screen which is what i want. However i also want the browser window to SIT ABOVE other applications. google chrome and other browsers such as Microsoft edge should sit below the electron app.

I've looked at discussions online and apparently this is doable on macOs, however no ones really said for definite if this can be done on windows devices or not.

Heres my code:

const createWindow = () => {
    // Create the browser window.
    const mainWindow = new BrowserWindow({
        width: 1920,
        height: 200,
        alwaysOnTop:true,
        titleBarStyle: 'none',
        frame: false,
        resizable: false,
        minimizable: false,
        type: 'toolbar',
        webPreferences: {
            nodeIntegration: true,
            contextIsolation: false}
        });
  
    mainWindow.setAlwaysOnTop(true, "screen-saver");
    mainWindow.setVisibleOnAllWorkspaces(true);
    mainWindow.setMenuBarVisibility(false);
    mainWindow.moveTop();
    mainWindow.setPosition(0,0)
    // and load the index.html of the app.
    mainWindow.loadFile(path.join(__dirname, 'index.html'));

Does anyone have a solution for this?

Thankyou

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

I do not believe that this is natively possible on Windows and Linux OS machines using Electron and Node.js alone.

I believe you will need to write a C++ script that can query the OS windows that are open. Then by communicating back and forth between the C++ script and Electron, your Electron application can then become 'aware' of the position of the other windows. Then, though your C++ script, set the position and size of the other window(s) to snap to the bottom of your Electron application window.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda