skiff-org / skiff-windows-app

Skiff's Windows app for privacy-first, end-to-end encrypted Mail, Drive, Calendar, and Pages.
https://skiff.com
GNU Affero General Public License v3.0
108 stars 70 forks source link

Minimize/Close to Tray then launch from taskbar creates duplicate processes #22

Open networkydev opened 10 months ago

networkydev commented 10 months ago

On the windows client, when you set it to "Minimize to Tray" or "Close to Tray", when you click the icon on taskbar again, it will open a new process. So basically, clicking on the taskbar should open the current one minimized to the tray.

Novack commented 10 months ago

Hello there. Nope, this is not so (in case you understand it, you you can simply look at the code and check that is only showing/hiding the window). You will see a new App process in the Task Manager, but is the same process moving from background to foreground, and back.

networkydev commented 10 months ago

Even if it is opening the same process, it still does open new windows and create new icons in the tray. Closing one of the Skiff processes does crash many of the windows, which means it is using some shared processes but using new GUI windows. This might be solved by running a new process that simply caches the window and shows/hides the window itself, not just the background process.

                            |

This is what I mean V image

Novack commented 10 months ago

Oh but it works like you describe, is just using standard window hide/show (again, look at the code if you want), so what you're experiencing is not an intentional result of the code itself, but a bug of some sorts. My bet is in the process crashing and so old icons remaining? You may need to offer more context, because I've never seen that, and of course is not how it works.

Are you running it by yourself only once?

riverar commented 10 months ago

I can reproduce this @Novack.

  1. Launch Skiff and configure it to minimize at startup, and close/minimize to tray
  2. Pin Skiff to the Taskbar
  3. Close the Skiff window
  4. Click the pinned Taskbar icon to launch another instance of Skiff
Novack commented 10 months ago

Ohh I get it now, thank you. Will jump into this later today.

Novack commented 9 months ago

With some delay on my part, but this got fixed on recent commits, and will be available on next release.

vvirtues commented 8 months ago

Can confirm