eneshecan / whatsapp-for-linux

An unofficial WhatsApp desktop application for Linux.
GNU General Public License v3.0
1.01k stars 104 forks source link

Unintuitive behavior with both "start in tray" + "close to tray" enabled, especially for GNOME #320

Closed FelixFourcolor closed 1 year ago

FelixFourcolor commented 1 year ago

Suppose both "start in tray" and "close to tray" are enabled.

When the app is closed to tray, in order to reopen the app, you have click the tray icon > show, like this:

Screenshot from 2023-07-14 00-30-25

If you open the app from the system menu, another in-tray process would be created, like this:

https://github.com/eneshecan/whatsapp-for-linux/assets/34260584/00739084-d7ed-4727-8ac1-0213a1688c14

I don't think anyone would want to open multiple processes in-tray, so this behavior is unintuitive. I use Gnome, which by default does not show tray icons, and it took me a while to figure out why launching the app aparently did nothing. So Gnome makes this behavior even more unintuitive.

This behavior does not exhibit when "start in tray" is disabled. The app correctly detects that an instance is already running in tray and opens its window; no extra process is created.

Suggestion: When the app is launched, if an instance is already running in tray, it opens it in-window regardless of the "start in tray" preference; only if not, it starts a new process and opens it in-window or in-tray depending on the "start in tray" preference.


Edit: My browser cannot play the video. If yours also cannot, don't worry about it, I think my words describe the behavior sufficiently.

eneshecan commented 1 year ago

The main issue about multiple instances is fixed. Could you please create an issue for your suggestion about showing the window when the app is already in the tray? That requires a bit of work.