最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Electron : Create a window above all the others (even fullscreen) and hide taskbar - Stack Overflow

programmeradmin0浏览0评论

As the title of my question may be sufficiently understandable, I'll explain anyway.

I'm working on a personal project with Electron, and I'm facing a frustrating issue which is :

I'd like to create a small window (50x50 px) which would be above every other window, even when those are fullscreen. I mean, even if I'm on Youtube with Chrome and I enter fullscreen, my window would stay on top of it.

Basically, I've succeeded in making my window above all the others, a simple setAlwaysOnTop(true) did the trick. However, the taskbar in Windows keeps showing, but if I hide my window or just close it, the taskbar disappears and everything's fine.

So my question is : How can I achieve to have a window above all the others, including fullscreen ones, which wouldn't make the taskbar visible ? (in my sense, the taskbar kills the fullscreen end-user experience).

Details : my window has transparency enabled, and both kiosk mode and fullscreen mode are not needed since I only use 50x50 px.

Thank you for your help.

As the title of my question may be sufficiently understandable, I'll explain anyway.

I'm working on a personal project with Electron, and I'm facing a frustrating issue which is :

I'd like to create a small window (50x50 px) which would be above every other window, even when those are fullscreen. I mean, even if I'm on Youtube with Chrome and I enter fullscreen, my window would stay on top of it.

Basically, I've succeeded in making my window above all the others, a simple setAlwaysOnTop(true) did the trick. However, the taskbar in Windows keeps showing, but if I hide my window or just close it, the taskbar disappears and everything's fine.

So my question is : How can I achieve to have a window above all the others, including fullscreen ones, which wouldn't make the taskbar visible ? (in my sense, the taskbar kills the fullscreen end-user experience).

Details : my window has transparency enabled, and both kiosk mode and fullscreen mode are not needed since I only use 50x50 px.

Thank you for your help.

Share Improve this question asked Jan 15, 2017 at 23:51 David MellulDavid Mellul 1111 silver badge5 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 8

Well, I fixed the issue by doing this :

window = new BrowserWindow({ ...  type:'toolbar' ... });`

This makes the window act exactly as the Skype Window when you're on call : It's always on top, even when you're in fullscreen browser and the taskbar won't show unless you focus explicitly your window.

Remark : Your window won't be on top of programs such as video games (League of Legends, Dota, aso.) because they usually manipulate the graphical rendering so that you can't go on top of em.

Hope this will help !

发布评论

评论列表(0)

  1. 暂无评论