Sign in Join

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

Mailing lists / lazarus / 2023-12

Lazarus and Wayland display manager

8 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

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

John Landmesser

Just trying lazarus on new distribution nobara ( Fedora clone ) with wayland, but it seems that the IDE sometimes get in trouble with this display manager wayland. Changed back to x11 that is much better.

Lazarus 3.99 (rev main_3_99-1123-gd2954c9818) FPC 3.2.2 x86_64-linux-gtk2

In Lazarus mailing list i found:

Show quoted text 20 lines
On Mon, Feb 22, 2021 at 10:52 AM Juha Manninen <juha.manninen62 at gmail.com> wrote: > The libXtst library dependency pulled in for Linux (and UNIX) was a > 100% increase of system dependencies for a Lazarus release, and for > absolutely no benefit. > Now Lazarus BigIde depends on just libgtk2.0-dev. > Ok, that was not accurate. Many other system libraries are pulled in by libgtk2.0-dev. However in a distro package system level it is the only requirement. Adding dependency for X brings another problem: Lazarus would not work with Wayland display server. Now it works if the widgetset supports Wayland. Major widgetsets like GTK3 and QT5 do support it. Not sure about GTK2. Juha

Is that still true ... ?

Wayland in general has strange issues?!

Reply by email

Juha Manninen
to John Landmesser

On Sun, Dec 31, 2023 at 3:36?PM John Landmesser via lazarus <

Show quoted text 5 lines
wrote: Is that still true ... ? Wayland in general has strange issues?!

As LCL binds to widgetsets like QT5 and GTK3, it should depend on those widgetsets only.
Lazarus IDE also uses LCL and its underlying widgetsets. I guess other QT5 and GTK3 apps work, thus the problem is in LCL binding code.
They should be studied and fixed case by case.

I don't think GTK2 should be used with Wayland. GTK2 was made before Wayland existed.
Do distros that use Wayland by default still include GTK2 applications?

BTW, the mail you copied is from me but I forgot the context. libXtst library dependency was removed from somewhere.

Juha
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20240101/f919bcca/attachment.htm>

Reply by email

Michael Van Canneyt
to Juha Manninen
Juha Manninen wrote 17 lines
On Sun, Dec 31, 2023 at 3:36?PM John Landmesser via lazarus < > wrote: > Is that still true ... ? > Wayland in general has strange issues?! > As LCL binds to widgetsets like QT5 and GTK3, it should depend on those widgetsets only. Lazarus IDE also uses LCL and its underlying widgetsets. I guess other QT5 and GTK3 apps work, thus the problem is in LCL binding code. They should be studied and fixed case by case. I don't think GTK2 should be used with Wayland. GTK2 was made before Wayland existed. Do distros that use Wayland by default still include GTK2 applications?

Yes. They work through the waylaynd X11 client.

The X11 client is needed since there are way(!) too much apps that require X and which cannot be ported to wayland without major rewrites..

Michael.

Reply by email

Kostas Michalopoulos
to Juha Manninen: On Sun, Dec 31, 2023 at 3:36?PM John Landmesser via lazarus < As LCL binds to widgetsets…
Juha Manninen wrote
I don't think GTK2 should be used with Wayland. GTK2 was made before Wayland existed.

Gtk2 works fine with Wayland using XWayland (basically a rootless Xorg that uses Wayland to manage windows) which pretty much all desktop environments ship and support (and AFAIK there are no plans in the foreseeable future for XWayland to be dropped). In fact when i tried a Gtk2 program under KDE Wayland on a small laptop even scaling worked as expected (KDE allows X11 programs to handle scaling themselves instead of having the compositor scale the windows as a bitmap).

There is some functionality that is not supported because Wayland itself doesn't support it - e.g., IIRC you can't change the cursor's position and i think trying to grab a screenshot gives you a black image - but that'd affect toolkits that use Wayland directly too.

Do distros that use Wayland by default still include GTK2 applications?

The stable version of GIMP is still using Gtk2 and i think this is included by distros that use Wayland by default.

Kostas

Reply by email

Kostas Michalopoulos
to John Landmesser: Just trying lazarus on new distribution nobara ( Fedora clone ) with wayland, but it…
John Landmesser wrote
Just trying lazarus on new distribution nobara ( Fedora clone ) with wayland, but it seems that the IDE sometimes get in trouble with this display manager wayland. Changed back to x11 that is much better.

What are the issues you face? Sadly it seems the Gtk2 LCL widgetset does some weird stuff on its own and it sometimes has issues even with X11 window managers.

Kostas

Reply by email

John Landmesser
to Kostas Michalopoulos
Kostas Michalopoulos wrote 11 lines
On 12/31/23 15:35, John Landmesser via lazarus wrote: > Just trying lazarus on new distribution nobara ( Fedora clone ) with > wayland, but it seems that the IDE sometimes get in trouble with this > display manager wayland. Changed back to x11 that is much better. What are the issues you face? Sadly it seems the Gtk2 LCL widgetset does some weird stuff on its own and it sometimes has issues even with X11 window managers. Kostas

I had issues with the Lazarus IDE itself: instead of a form it showed a fullscreen white window and at next lazarus boot asked me if to open this broken project again or begin a new project.

I don't look any further on this issue: removed that distribution and use my working Manjaro with X11 :-)

Reply by email

Kostas Michalopoulos
to John Landmesser
John Landmesser wrote
I had issues with the Lazarus IDE itself: instead of a form it showed a fullscreen white window and at next lazarus boot asked me if to open this broken project again or begin a new project.

Hm, perhaps it was some botched configuration? Out of curiosity i downloaded and tried "Nobara 39 Official" (latest version from their site, it uses KDE), installed FPC from the repository and Lazarus from git (trunk) and it worked fine (wonky theme aside):

https://i.imgur.com/S1gld6B.png

I did try it in a VM though (and everything was very sluggish), but this shouldn't affect anything related to Wayland. Also i didn't try the Gnome-based version, was the one you tried Gnome or KDE?

Kostas

Reply by email

John Landmesser
to Kostas Michalopoulos
Kostas Michalopoulos wrote 18 lines
On 1/2/24 17:46, John Landmesser via lazarus wrote: > I had issues with the Lazarus IDE itself: instead of a form it showed a > fullscreen white window and at next lazarus boot asked me if to open > this broken project again or begin a new project. Hm, perhaps it was some botched configuration? Out of curiosity i downloaded and tried "Nobara 39 Official" (latest version from their site, it uses KDE), installed FPC from the repository and Lazarus from git (trunk) and it worked fine (wonky theme aside): https://i.imgur.com/S1gld6B.png I did try it in a VM though (and everything was very sluggish), but this shouldn't affect anything related to Wayland. Also i didn't try the Gnome-based version, was the one you tried Gnome or KDE? Kostas

I had KDE only that worked ok but the IDE of lazarus had issues as i told .

I deleted Nobara and so the issues with Lazarus are also deleted :-)

As a sidenote ... i often read NoBra instead of Nobara and thats my own issue :-)

Good night!

JohnML

Reply by email