Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

336
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!