haiwen / seafile-client

Seafile desktop client.
http://seafile.com
Apache License 2.0
462 stars 281 forks source link

[Feature] Open client window on startup if client is already running in background #1537

Open sezaru opened 1 month ago

sezaru commented 1 month ago

If you use the client with the Hide main window when started option enabled and you already have it running in the background, clicking in the client shortcut will not show the window.

This is specially problematic in systems that don't have a systray like Gnome and Sway since that means that I have to disable the Hide main window when started option and have that window show up every-time I restart my computer.

Solution

I think the best behavior would be the following:

When the user clicks to open the client, the client will check if that is a fresh start or if the client is already up.

If it is a fresh start and the Hide main window when started is enabled, it will open the client without showing the window.

If the client is already running in the background, it will show its window since in this case the client interprets that the user want to actually open the client and interact with it.

I believe this would also fix the client in background not being able to show its window using the Gnome background apps list:

image