Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2022-02

Trayicon popup menu no longer showing images

8 messages · 4 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Michael Van Canneyt

Hello,

I recompiled an older tray application. It used to show images in the tray icon popup menu, but after compilation, the tray popup menu no longer shows the images; just a small rounded square where an image should appear.

Linux mint, today's lazarus, GTK2 widgetset.

Is this a known issue ?

Michael.

Reply by email

John Landmesser
to Michael Van Canneyt
Michael Van Canneyt wrote 14 lines
Hello, I recompiled an older tray application. It used to show images in the tray icon popup menu, but after compilation, the tray popup menu no longer shows the images; just a small rounded square where an image should appear. Linux mint, today's lazarus, GTK2 widgetset. Is this a known issue ? Michael.

... perhaps the same issue as : tray icon does not show Hint-window any more.

That was working for ages with gtk2 but somehow stopped working.

Juha told me to use qt5 in Project options and the issue was gone.

Disadvantage: libqt5pas has to be installed. Don't know how this is called on Mint.

John

Reply by email

Michael Van Canneyt
to John Landmesser
John Landmesser wrote 23 lines
Am 16.02.22 um 14:22 schrieb Michael Van Canneyt via lazarus: > > Hello, > > I recompiled an older tray application. It used to show images in the > tray > icon popup menu, but after compilation, the tray popup menu no longer > shows the > images; just a small rounded square where an image should appear. > > Linux mint, today's lazarus, GTK2 widgetset. > > Is this a known issue ? > > Michael. ... perhaps the same issue as : tray icon does not show Hint-window any more. That was working for ages with gtk2 but somehow stopped working. Juha told me to use qt5 in Project options and the issue was gone.

That's not an acceptable solution.

The gtk2 widgetset should be fixed, this is clearly a regression.

Michael.

Reply by email

John Landmesser
to Michael Van Canneyt
Michael Van Canneyt wrote 33 lines
On Wed, 16 Feb 2022, John Landmesser via lazarus wrote: > Am 16.02.22 um 14:22 schrieb Michael Van Canneyt via lazarus: >> >> Hello, >> >> I recompiled an older tray application. It used to show images in the >> tray >> icon popup menu, but after compilation, the tray popup menu no longer >> shows the >> images; just a small rounded square where an image should appear. >> >> Linux mint, today's lazarus, GTK2 widgetset. >> >> Is this a known issue ? >> >> Michael. > > > ... perhaps the same issue as : tray icon does not show Hint-window any > more. > > That was working for ages with gtk2 but somehow stopped working. > > Juha told me to use qt5 in Project options and the issue was gone. That's not an acceptable solution. The gtk2 widgetset should be fixed, this is clearly a regression. Michael.

perhaps reopen this one?

https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/39194

Reply by email

Kostas Michalopoulos
to Michael Van Canneyt: I recompiled an older tray application. It used to show images in the tray icon popup…
Michael Van Canneyt wrote 6 lines
I recompiled an older tray application. It used to show images in the tray icon popup menu, but after compilation, the tray popup menu no longer shows the images; just a small rounded square where an image should appear. Linux mint, today's lazarus, GTK2 widgetset.

There was some change recently in the tray backend to use a "new" one by default:

https://gitlab.com/freepascal.org/lazarus/lazarus/-/commit/99e4bd2515fc118abebc58f7e7f3d7ac385e6d63

From a quick look at the code there seems to be a way to force the "traditional" backend by using LAZUSEAPPIND=NO environment variable, so try to launch your program as

   $ LAZUSEAPPIND=NO ./yourprogram

...and see if that fixes it. If so then it might be a bug in the app indicator backend or an issue with Cinnamon's app indicator implementation (i remember reading it had some issues some time ago).

Kostas

Reply by email

Michael Van Canneyt
to Kostas Michalopoulos
Kostas Michalopoulos wrote 22 lines
On 2/16/22 15:22, Michael Van Canneyt via lazarus wrote: > I recompiled an older tray application. It used to show images in the tray > icon popup menu, but after compilation, the tray popup menu no longer shows > the > images; just a small rounded square where an image should appear. > > Linux mint, today's lazarus, GTK2 widgetset. There was some change recently in the tray backend to use a "new" one by default: https://gitlab.com/freepascal.org/lazarus/lazarus/-/commit/99e4bd2515fc118abebc58f7e7f3d7ac385e6d63 From a quick look at the code there seems to be a way to force the "traditional" backend by using LAZUSEAPPIND=NO environment variable, so try to launch your program as $ LAZUSEAPPIND=NO ./yourprogram ...and see if that fixes it. If so then it might be a bug in the app indicator backend or an issue with Cinnamon's app indicator implementation (i remember reading it had some issues some time ago).

With this workaround it works. Thank you.

Michael.

Reply by email

Kostas Michalopoulos
to Michael Van Canneyt
Michael Van Canneyt wrote
With this workaround it works. Thank you.

Perhaps you could try spinning up an Ubuntu VM and see if the bug persists there - in which case it'd be a Gtk2 backend bug, otherwise it is probably a bug with how Cinnamon implements app indicator.

Kostas

Reply by email

Juha Manninen
to Kostas Michalopoulos: There was some change recently in the tray backend to use a "new" one by default:…

On Wed, Feb 16, 2022 at 4:49 PM Kostas Michalopoulos via lazarus <

Show quoted text 12 lines
wrote: From a quick look at the code there seems to be a way to force the "traditional" backend by using LAZUSEAPPIND=NO environment variable, so try to launch your program as $ LAZUSEAPPIND=NO ./yourprogram ...and see if that fixes it. If so then it might be a bug in the app indicator backend or an issue with Cinnamon's app indicator implementation (i remember reading it had some issues some time ago).

Yes, it is mentioned also here:
https://wiki.lazarus.freepascal.org/How_to_use_a_TrayIcon I wish it worked always without any environment variables. However I understand David Bannon studied the issue a lot with many Linux distros and this was the best solution for all distros, new and old. I guess the problem will go away gradually when the new AppInd stuff spreads.

Juha
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20220216/46ed1d14/attachment-0001.htm>

Reply by email