max-mapper / menubar

➖ high level way to create menubar desktop applications with electron
BSD 2-Clause "Simplified" License
6.67k stars 365 forks source link

Question: Is there a way to detach menubar applications? #284

Open ahmed-musallam opened 4 years ago

ahmed-musallam commented 4 years ago

Description

First, thank you for building this! it's awesome and I was able to build a cool app with it.

I want to implement this feature where a user can click a button and detach the window from the tray so that it becomes it's own separate window. The user should also be able to re-attach the window so it's back to appearing when clicking on the system tray icon. Is this possible?

I know I can create a new BrowserWindow and probably hack this together, but I'd like to use my existing window instead.

Thanks!

RobbieTheWagner commented 4 years ago

@ahmed-musallam did you ever figure something out for this? I think it would be cool as well.

ahmed-musallam commented 4 years ago

@rwwagner90 I have not, not yet. ;(

linonetwo commented 2 years ago

Hi, this is implemented in https://github.com/webcatalog/neutron

It has an option in preference to letting users select whether use the menubar app or use the windowed app. The concept is just if (menubar) { create window } else { create menubar } .

And sadly, it requires a restart. But I think just destroy the menubar app and create a window is not that hard. As the main process is always running and handling the window creation.