[Lazarus] Lazarus and Wayland display manager

Kostas Michalopoulos badsector at runtimeterror.com
Tue Jan 2 16:37:17 CET 2024


On 1/1/24 09:47, Juha Manninen via lazarus 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



More information about the lazarus mailing list