daisy / pipeline-ui

A user interface for the DAISY Pipeline 2
MIT License
5 stars 2 forks source link

With default settings window can not be brought back from the tray #96

Closed bertfrees closed 1 year ago

bertfrees commented 1 year ago

This is related to https://github.com/daisy/pipeline-ui/issues/74. On macOS, now when the window is closed it can not be brought back except through launching the application again. The tray menu is all greyed out (and the app is not visible in the dock, which is intended). Launching the application again will result in the "The application can keep running in the tray" message. When "remember this decision" is chosen it will work fine the next time.

marisademeglio commented 1 year ago

I can't reproduce this on mac. What are the exact steps? You start it and it uses the default settings ("ask when closing the window"). Then what?

bertfrees commented 1 year ago

All the item are now greyed out.

You get the dialog now which you should have gotten when you closed the window.

The items in the tray menu can now be selected.

rdeltour commented 1 year ago

Yeah, got this too, could reproduce with Bert's steps.

marisademeglio commented 1 year ago

Thanks for the recipe though I still cannot reproduce this one.

NPavie commented 1 year ago

So i was able to reproduce the "all greyed" tray menu, but it was because the dialog asking if the app should be closed or kept open was opened. As soon as i close the dialog, the tray menu is not greyed anymore.

What I think here is that on macOS, when electron opens a dialog without any specific window bound to it, it seems to go up in the UI tree of the app, so it is greying the tray on macOS, but it is also blocking the settings window if it is opened when i test it. (It does not behave like this on Windows : the tray menu remains fully usable with the dialog opened).

Si i think it's possibly normal behavior on MacOS with Electron ad Alert dialog without linking the dialog to a specific window.

This can be mitigated by not closing the window until user is selecting an action and binding the dialog to the window : If i do this, the tray remain usable on MacOS and only the main window is greyed out.