Help to make the same window, as with Skype when we call, we see window with call info, via Electron. The point is that this window is always on top of all Windows on your puter, including games.
The alwaysOnTop
parameter: true sets the window in front of all other Windows, but the game covers it in full-screen mode.
Is it possible and how it can be implemented in the Electron or in what ways it can be done?
Help to make the same window, as with Skype when we call, we see window with call info, via Electron. The point is that this window is always on top of all Windows on your puter, including games.
The alwaysOnTop
parameter: true sets the window in front of all other Windows, but the game covers it in full-screen mode.
Is it possible and how it can be implemented in the Electron or in what ways it can be done?
Share Improve this question edited Mar 12, 2018 at 11:07 mmvsbg 3,58817 gold badges54 silver badges74 bronze badges asked Mar 12, 2018 at 9:39 ГлебГлеб 211 gold badge1 silver badge2 bronze badges2 Answers
Reset to default 4On macOS, it is possible to set the window to be always on top with more options by using the BrowserWindow instance method win.setAlwaysOnTop()
instead of the alwaysOnTop
flag:
win.setAlwaysOnTop(flag[, level][, relativeLevel])
Values include
normal
,floating
,torn-off-menu
,modal-panel
,main-menu
,status
,pop-up-menu
,screen-saver
, anddock
(Deprecated). The default isfloating
.
You may want to try all possible level values to get the one which may fit your needs.
Setting window.setAlwaysOnTop(true, "normal")
does the trick as suggested by
Alok Kamboj
I was stuck on same thing and managed to make always on top work using this particular hack(in this particular order) -
// Tricky way to bring cam bubble to top over fullscreen windows on mac
win.setVisibleOnAllWorkspaces(true, { visibleOnFullScreen: true });
win.setAlwaysOnTop(true, "floating");
win.setFullScreenable(false);
// Below statement pletes the flow
win.moveTop();
Now this used to work when I was on electron 9.3.5 and stopped working after I upgraded to 13.1.2. Now I'm able to achieve the same thing using "normal"
.