stretchly icon indicating copy to clipboard operation
stretchly copied to clipboard

[Bug]: tray icon menu UI issues on Ubuntu 20.04 Gnome

Open samegens opened this issue 1 year ago • 5 comments

Version

  • [X] I'm using version 1.10.0

Known issues

  • [X] I've checked Known issues

Existing issues

  • [X] I've checked Existing issues

What operating system are you using?

Linux

Operating System Version

Ubuntu 20.04

Reproduction steps

  1. Install Stretchly 1.10.0
  2. Start Stretchly
  3. Notice that every 10 seconds, the tray icon flickers: it changes for a moment to an ellipsis (...) icon and then switches back to the regular icon.
  4. Open the tray menu, open one of the submenus, for example 'skip to the next', wait for 10 seconds and notice that the submenu will close of its own. ... Reproduces how often: [What percentage of the time does it reproduce?] 100%

Expected Behavior

I expect to not have an icon that flickers, or only when it actually needs to change. I expect submenus in the tray menu to stay open until I select something or I close the menu.

Actual Behavior

  • every 10 seconds, the tray icon flickers,
  • submenus in the tray menu are closed automatically after 10 seconds

Relevant log output

None.

Preferences

No response

Additional information

This is caused by always calling appIcon.setImage and appIcon.setContextMenu from updateTray which is called every 10 seconds. Interestingly when I comment out one of them (doesn't matter which one), the flicker is gone.

I have a fix on my system where Stretchly remembers the previous icon path and menu template and only calls setImage when the new icon path is different and only calls setContextMenu when the new menu template is different. This fixes the issues on my machine. I can turn this into a PR if that's helpful.

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

samegens avatar Jul 30 '22 11:07 samegens

Hi it's flicking every 10 seconds because tray meny shows times to next breaks and I want them to be up to date (as it changes constantly).

I am on Debian with KDE and no flickering is happening, must be something with Gnome. What version is it?

hovancik avatar Aug 06 '22 12:08 hovancik

I have this same issue

OS: Ubuntu 22.04.1 LTS x86_64 Kernel: 5.15.0-46-generic

This is on GNOME 42.2

In /var/log/syslog

Aug 11 14:53:55 ryan-Z370P-D3 [email protected][4651]: Stretchly1, Impossible to lookup icon for 'Stretchly1_23-panel' in path /run/user/1000/snap.stretchly/.org.chromium.Chromium.CcLVQe Aug 11 14:53:55 ryan-Z370P-D3 [email protected][4651]: unable to update icon for Stretchly1

Hope this helps

hadley8899 avatar Aug 11 '22 13:08 hadley8899

Maybe try https://github.com/ubuntu/gnome-shell-extension-appindicator/issues/176#issuecomment-1164221529 ?

hovancik avatar Aug 11 '22 18:08 hovancik

I tried disabling the extension [email protected] and installing [email protected] and indeed the flicker every 10 seconds is gone. However, the menu behavior is even worse: the whole menu is completely closed every 10 seconds. So my preferred solution is to only update the tray menu when something changes. Most of the time, only once per minute does it need to change. See my proposed fix: https://github.com/hovancik/stretchly/compare/trunk...samegens:stretchly:fix/tray-menu-issues

samegens avatar Aug 14 '22 17:08 samegens

@samegens cool :) Could you please make a PR, so I can try it out?

hovancik avatar Aug 19 '22 12:08 hovancik

Thanks! I didn't have time yet to properly finish this.

On Sat, Sep 24, 2022, 14:26 Jan Hovancik @.***> wrote:

Closed #1180 https://github.com/hovancik/stretchly/issues/1180 as completed via #1195 https://github.com/hovancik/stretchly/pull/1195.

— Reply to this email directly, view it on GitHub https://github.com/hovancik/stretchly/issues/1180#event-7451953109, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEFO5JV4KYS5NBF43ILHCT3V73XPXANCNFSM55DBVQCQ . You are receiving this because you were mentioned.Message ID: @.***>

samegens avatar Sep 24 '22 15:09 samegens