Martchus / syncthingtray

Tray application and Dolphin/Plasma integration for Syncthing
https://martchus.github.io/syncthingtray/
Other
1.57k stars 43 forks source link

Tray icons sometimes appear on top of each other when using multiple connections #84

Closed tomasz1986 closed 2 years ago

tomasz1986 commented 3 years ago

Relevant components

Environment and versions

Bug description

I have probably always had this problem, but this is the first time to report it. Basically, the tray icons sometimes spawn on top of each other. This seems to only happen on successive runs, but not on the first one. The way to fix the issue is to manually drag one of the icons to a different position. Then, the missing icon suddenly appears. I am not sure whether this is limited to Windows or not.

Steps to reproduce

  1. Start Syncthing Tray with multiple connections (e.g. syncthingtray --connection 1 2 3)
  2. Three icons appear in tray.
  3. Close Syncthing Tray completely.
  4. Repeat step 1.
  5. Only two icons appear in tray.
  6. Dragging one of the two icons to a different position makes the third one appear.

Expected behavior

All the icons should always appear in tray.

Screenshots

Additional context

Martchus commented 3 years ago

I'm not using multiple connections under Windows so I haven't encountered it yet. In fact, I did my tests for the feature to allow multiple connections like --connection 1 2 3 exclusively under X11. So it might be a limitation of Windows, indeed. From the point of Syncthing Tray both icons are created independently but of course it happens in quick succession. Maybe Windows or Qt or a combination of both can not handle the creation of two icons in quick succession. I don't know any other applications which support creating multiple tray icons in quick succession so I don't know how to cross-check whether it is a general Windows problem.

tomasz1986 commented 3 years ago

Yeah, but the strange thing is that the first run does always produce all the three icons. It is only in the later runs that one icon is missing :confused:.

Martchus commented 3 years ago

Yes, that's indeed strange. By the way, when testing on X11 I started the app over and over again (like in the steps to reproduce) so I would have encountered it definitely if the problem would happen there as well. Except if it only happens with Qt 6 which I haven't been using at the time.

tomasz1986 commented 3 years ago

Just to add more information, it seems to be the first connection that does not appear, i.e. 1 when using --connection 1 2 3.

Also, normally the problem is non-existent for me, as I usually start Syncthing Tray on user log on and leave it there, but I have seen it plenty of times in my testing, so I thought that it would be good to have an issue for it.

tomasz1986 commented 3 years ago

I would like to add a little bit more context. I think that I know when exactly this happens. It seems to be related to how many icons can be displayed in a row.

To reproduce:

  1. Change taskbar location either to the left or right side of the screen.
  2. The width of the taskbar now determines how many icons can be displayed in a row.
  3. Keep starting new instances of SyncthingTray (either with --new-instance or using multiple configs with --connection)
  4. Once the first row of icons gets filled, the next icon gets placed on top of the last one instead of moving to the next row. image

Basically, this problem will likely not happen if the taskbar is placed on the bottom (default) or on the top of the screen. I personally usually place it on the side, and that is probably why I have encountered this issue.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.