vladimiry / ElectronMail

Unofficial ProtonMail Desktop App
GNU General Public License v3.0
1.52k stars 99 forks source link

Separate "close window" and "quit" behaviour on macOS #440

Open ELLIOTTCABLE opened 3 years ago

ELLIOTTCABLE commented 3 years ago

I'm unsure about the other platforms supported; but on macOS, all of an app's windows can normally be closed without that affecting whether the application-process continues to run:

https://user-images.githubusercontent.com/200/132422918-c057423d-a38a-464d-8168-42403fdc6359.mov

(Example is Discord, another Electron application.) At the moment, ElectronMail behaves more like (I think? iirc?) a Windows app, quitting entirely if you close its window:

https://user-images.githubusercontent.com/200/132423457-87c9cc72-a6ed-47c6-9b7b-8504021e3536.mov


Relatedly, there's some settings in the control-panel about "closing to the tray" - on macOS, that is a somewhat meaningless phrase, but it does seem to have the combined effect of:

  1. Creating a menubar-item for ElectronMail, and
  2. preventing ElectronMail from quitting when the window is closed.

Ideally, these two settings would be split up, instead of being combined(?) into one toggle; something like:

  1. "Quit when last window is closed" — as an example, here's the settings for VimR, another vaguely-related macOS application

    Screen Shot 2021-09-07 at 18 40 57
  2. "Show ElectronMail status in menubar" or "Hide ElectronMail in menubar" or similar — as an example, another application, Fantastical, has these relevant settings:

    Screen Shot 2021-09-07 at 18 43 20

None of these is critical, though; there's sufficient work-arounds available to make it usable (I, for instance, am keeping the old 'close to tray' setting enabled for the moment; and using Bartender to hide the resultant icon that I do not want. No big deal.) Just further fodder for the 'macOS user-friendliness' stack. 😉

vladimiry commented 3 years ago

Thanks for placing the thorough issue. It looks fancy.

am keeping the old 'close to tray' setting enabled

The app by the way also has such option, enabled by default.

At the moment, ElectronMail behaves more like (I think? iirc?) a Windows app, quitting entirely if you close its window:

Well, being in a positioin of not running macOS and given the nature of the project and limited human capacity, I'm generally prefer the features in the app act similarly across the platforms. Means that in this project I normally avoid doing extra work specific to some systems. So far I think macOS has already been given a lot of special treatment here in comparison with other systems.

quitting entirely if you close its window:

The "Close to tray" option is enabled by default in the app, so closing the window only closes the window, the app still sits in the tray. Except for tray you can also unhide the window by running the app's binary/shortcut again (some users use this way for simulating the "getting the window from a tray" hotkey scenario).