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

347
Visualizações
Set browserWindow Always on top, Even if Other Apps/Games are in fullscreen [Electron, Windows OS]

How do I let me electron app be ontop of other apps or games that are in fullscreen mode, like an overlay on Windows.

This mainWindow.setAlwaysOnTop(true, "level"); works for most apps.

https://www.electronjs.org/docs/latest/api/browser-window

I've checked the electron docs and tried every different 'level' none of them work in games that are fullscreen.

Code:

  // Create the browser window.
  const mainWindow = new BrowserWindow({
    width: 800,
    height: 600,
  });

  // and load the index.html of the app.
  mainWindow.loadFile(path.join(__dirname, 'index.html'));

  mainWindow.setAlwaysOnTop(true, "level");


  // Open the DevTools.
  // mainWindow.webContents.openDevTools();
};

I'm currently testing this in League of Legends. Changing video setting to borderless, the window shows, however changing to fullscreen, the electron window is no longer infront.

I know its possible, because Discord (made with electron) has an overlay that is shown in games that are set to fullscreen.

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

0

Overlays aren't possible in electron.js, since it only interacts with the standard win32 api.

If I recall correctly, discord uses a separate, lower level application for their overlays.

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