openstenoproject/plover

Icons get left in Windows task tray after warning/error messages are shown.

Closed this issue · 2 comments

Describe the bug
With Plover running, when any warnings or errors are shown as Windows notifications, an icon is left in the Windows task tray. For example, shutting off my writer will get an error, or a warning that says stenograph machine disconnected, then when I turn the machine back on, I'll get another warning that the machine is connected. If I look in the task tray, there will be a series of Plover icons. If I move the mouse over each one, it will disappear. It appears there's one icon put in the task tray for each warning or error that is displayed. Eventually, only the Plover main icon is remaining.

To Reproduce

Steps to reproduce the behavior:

With plover running and Stenograph machine running and showing "connected":

  1. Turn off steno machine - warning or error should be shown.
  2. Turn on steno machine - warning about reconnecting should be shown.
  3. Repeat a few times if desired.
  4. Note the system task tray - it may contain one Plone green icon for each message that was displayed.
  5. Hover over each one - they will disappear.

Expected behavior
No icon should be put in the system task tray as a result of messages.

Screenshots
Here's what it looks like after a number of error/warnings were displayed:
image

Example of the errors that slide-in:
image
image

Video: https://www.screencast.com/t/gnoNjLFDU0

If applicable, add screenshots to help explain your problem.

Operating system

  • OS: Windows 11
  • Plover Version: 4.0.0.dev10

Hardware

Lenovo Intel-based machine (somewhat new, high powered)
Stenograph Luminex CSE

So exit handlers were not getting called: see #1507.

This fix the problem of some the icons being left even after exit, but there's still the issue that you end up with multiple ones. And the library we're using is creating a dedicated thread for each one and only removing the icon if the thread is garbage collected or on exit...

#1508 should take care of the remaining issues.