Recent

Author Topic: Lazarus Release Candidate 1 of 2.2.0  (Read 68383 times)

prof7bit

  • Full Member
  • ***
  • Posts: 134
Re: Lazarus Release Candidate 1 of 2.2.0 Systray
« Reply #120 on: October 19, 2021, 05:43:00 pm »

What is Launchpad?

Launchpad is the Ubuntu bug tracker. The only person who will (or won't) act on this is the one who is packaging Lazarus for Ubuntu. He will then either report it upstrem or patch it only for Ubuntu (and maybe (or not) send the patch upstream) or do nothing at all.

This should really be reported in the official Lazarus gitlab repository where dozens of active devs are reading.

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3968
  • I like bugs.
Re: Lazarus Release Candidate 1 of 2.2.0 Systray
« Reply #121 on: October 19, 2021, 06:08:10 pm »
Launchpad is the Ubuntu bug tracker.
Ok, thanks. I forgot that.

dbannon, do you have a test app to copy here. I don't have any at least in this machine. I will test it in my Manjaro Linux, too.
How about LCL-GTK3?
« Last Edit: October 19, 2021, 06:50:08 pm by JuhaManninen »
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

dbannon

  • Hero Member
  • *****
  • Posts: 1588
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Lazarus Release Candidate 1 of 2.2.0
« Reply #122 on: Today at 01:12:13 am »
Thanks Juha, in reverse order -

GTK3 should not be an issue, when I did the last Systray update for GTK3 we did not consider the traditional SysTray at all. From memory.

I'll make a test app later today (my time), cannot do it right now, sorry, bit pushed for time.  But easy test, in designer drop a SysTray on the form, give it a an icon and assign a popup menu (thats important, the SysTray must have aan icon and a popup menu with at least one menu item).

Compile and run, on U2110 Gnome, the menu will popup but not where the user expects it.

@prof7bit, to clarify, two possible fixes for this situation -
1. Get Ubuntu to reverse decision to stop supporting old Systray. As they are the last distro to support it, seems unlikely. the issue is within the Desktop, Lazarus does what Lazarus has always done.
2. Apply my patch. its not something for the Lazarus packagers at Debian (or Ubunbu), then apps make with the patched Lazarus will work as expected.  If we push the change I suggest to our Lazarus, eventually Debian will pick up that (they only take releases, never trunk or fixes) and once the fix is in Debian, Ubuntu will use it with their next release.

So, we can assume that Ubuntu has stopped tweaking Gnome to support the old Systray model. I doubt they will reverse that decision. They have also stopped shipping their own Unity based Appindicator, they now appear to ship Ayatana. Sadly, however, unlike other distros, U2110 X still reports it CAN do old systray when it cannot. So the autodetection code I had in there is useless. But its way past time we defaulted to AppIndicator anyway.

In the mean time, applications built using distro lazarus will have problems, packages built from "our" Lazarus will be OK.  For my app, for example, to build in the Debian repo, I will have to try and apply my patch live during the remote build, no idea if I can even do that. Sigh...

Sorry if my post sounds a bit garbled, in a hurry....

 Davo
Lazarus 2, Linux (and reluctantly Win10, OSX)
My Project - https://github.com/tomboy-notes/tomboy-ng

prof7bit

  • Full Member
  • ***
  • Posts: 134
Re: Lazarus Release Candidate 1 of 2.2.0
« Reply #123 on: Today at 08:41:30 am »
Sadly, however, unlike other distros, U2110 X still reports it CAN do old systray when it cannot.

Yes, this sounds like a bug in Ubuntu. Probably nobody there noticed it because the overwhelming majority of applications nowadays use the new API anyways and those few that are too old and still don't support it also won't query which systray API they should use because they are not aware of the change at all.

And I agree Lazarus should also use the new API by default. I remember may years ago (too many to count them) Ubuntu already started aggressively phasing out the old API and most applications just dropped the old one entirely and never looked back.


dbannon

  • Hero Member
  • *****
  • Posts: 1588
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Lazarus Release Candidate 1 of 2.2.0
« Reply #124 on: Today at 09:32:41 am »
TrayIcon Component on Linux

OK, here is a test app, much as I described but has the added 'feature' of asking X can it, or cannot it not do traditional systems tray. But, as we know, in U2110 at least, X lies !

It has a GTK2, GTK3 and Qt5 modes. In my system here, all work fine in my U2004 Mate machine but on U2110 Gnome the GTK3 version crashes and, as noted, in the GTK2 version, the TrayIcom Menu will popup in the wrong place, apparently randomly, if LCL is unpatched.

(The patch does nothing for GTK3, not sure whats happening there but a different issue. If its TrayIcon, I will look into it but not immediately.)

Davo
« Last Edit: Today at 09:34:20 am by dbannon »
Lazarus 2, Linux (and reluctantly Win10, OSX)
My Project - https://github.com/tomboy-notes/tomboy-ng

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3968
  • I like bugs.
Re: Lazarus Release Candidate 1 of 2.2.0
« Reply #125 on: Today at 11:18:56 am »
I applied the patch in 99e4bd2515. It will be merged to 2.2.
Yes, it improved the menu position of a GTK2 app under my KDE, although it was not totally bad even earlier.
The popup menu opens also with left mouse button. Is it intentional? The QT5 version opens popup only with right button.
The app compiled for GTK3 works here, too, identically with the GTK2 app.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

 

TinyPortal © 2005-2018