Open Bug 1666638 Opened 5 years ago Updated 21 days ago

Minimize to tray should also minimize on Windows close control

Categories

(Thunderbird :: General, enhancement)

Unspecified
Windows
enhancement

Tracking

(Not tracked)

UNCONFIRMED

People

(Reporter: bugzilla-mozilla24, Unassigned)

References

(Blocks 1 open bug)

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:81.0) Gecko/20100101 Firefox/81.0

Steps to reproduce:

I welcome the addition of a native minimize to tray functionality to finally arrive in Thunderbird 78 for Windows. I have been using MinimizeToTray, MinTrayR and its variants for years and when they finally stopped working in Firefox 68, I went ahead and wrote a tool that hooks Thunderbird's window procedure to emulate the same behaviour without relying on an extension.

I thought that I can finally get rid of my tool now, but the new tray icon is not quite there yet: It really only works when minimizing, but not when closing. The main reason why I used those extension and later my own tool was not just to save space in the taskbar, but also to prevent a crucial piece of software that should basically always run in the background from being closed accidentally. Hence there was an option in those add-ons to not just minimize to tray, but to also intercept clicks on the [x] button and minimize to tray instead of closing the client completely.

Actual results:

Even with the new native Thunderbird tray icon, closing the main window closes Thunderbird altogether.

Expected results:

I would like an option to also minimize Thunderbird to the system tray when hitting the [x] Close button of the window. The user could still quit Thunderbird completely by using the File menu, or by an option added to the context menu of the tray icon (my custom tray icon had two entries, "Restore Thunderbird" and "Close Thunderbird" - I think MinimizeToTray had similar options).

Component: Untriaged → General

I also support the idea of Johannes to set the option to "close" Thunderbird to system tray, instead of only minimizing to system tray.
Pete

OS: Unspecified → Windows
Summary: Minimize to tray should also minimize on close → Minimize to tray should also minimize on Windows close control

similar to bug 1679702 ?

I don't see the similarity. One is an option how to launch an application, this is about the window close button not being usable to minimize to tray. Fixing one won't fix the other.

For what it's worth, my TBTray tool (https://github.com/sagamusix/TBTray) has been rewritten to no longer provide its own tray icon. Instead, it uses Thunderbird's own tray icon and rewrite HTCLOSE / SC_CLOSE messages to SC_MINIMIZE.

See Also: → 1627479

I'm coming from github and I'm a bit confused. There's no like button here for the devs to prioritize this right? I also don't wanna spam the bug with (me too).

(In reply to Aftermath from comment #8)

I'm coming from github and I'm a bit confused. There's no like button here for the devs to prioritize this right? I also don't wanna spam the bug with (me too).

Up the top in the details there is a vote button. Fifth heading down from the top.

Also, the minimize button should still minimize. Enabling the tray icon shouldn't change the minimize button into closing the window like it does currently. And the tray icon should always be shown when enabled. It's really bizarre, the way they've currently implemented the tray icon, and inconsistent with nearly every tray application in existence.

It's how all the previous community efforts to create a tray icon for Thunderbird worked (including my TBTray) and if that behaviour was up for debate, I'd at least want to keep it as an option. Yes, I want both minimizing and closing Thunderbird make it go to the tray, because that way it won't be taking any space in my task bar while I'm waiting for new mail to arrive.

See Also: → 1810583

Can you please finally, finally, finally, FINALLY, add "Close to system tray"??? It's extremely important on slower virtual machines where starting TB takes literally forever, so it must be kept in memory to be usable... Just using the minimize button (together with Minimize to tray") instead of close is not an option, because that's a different thing and often I just want to minimize the window and keep it on the taskbar.

So PLEASE add this extremely important feature! It needs to be independent of "Minimize to tray", because that's a different thing...

The extension "KeepRunning" somewhat works, but it leads to undesired side effects (like the main window hiding when replying to a mail, the "Write" window minimizing, etc.), so it's not really an option.

Thanks!

No, because it can't be installed (it is not compatible with TB 132...)

Download the XPI, rename to ZIP, edit the manifest.json inside, install the ZIP file. Worth a try.

Thanks - this seems to work! However it's still not optimal, because I need to enable "when minimized, move to the tray". This also trays the app when I just want to minimize it regularly... As I mentioned, "Close to Tray" and "Minimize to Tray" should be 2 separate things...

I still hope this will eventually be added to TB, because it's extremely easy to implement and extremely useful...

What I've been using as a workaround is Systray-X: https://github.com/Ximi1970/systray-x, which can be configured to handle the window control buttons properly. Though it does require you to install a companion app rather than just a regular extension, and (on Linux), it won't work with native Wayland or Flatpak.

Good news! "Close to tray" is now available as an extension, aptly named Close to Tray. It lets you minimize the window without moving it to the tray, too. You can get it from addons.thunderbird.net here or from the GitHub page here.

You need to log in before you can comment on or make changes to this bug.