Wayland #193
Replies: 14 comments 58 replies
-
|
Amazing work Andrew! No reflection on your code: Wayland itself, is so weird. I honestly don't think it's an improvement over X11. They have dropped so many x11 features. From what I understand (not much) it looks like only per-desktop dpi [correction - per monitor dpi] was good. As for the TfpgWindow problem. There is a design pattern that might solve the problem. I'll have to hit my Gang-of-Four book to find it. |
Beta Was this translation helpful? Give feedback.
-
|
@andrewd207 : WOW. But like Graeme, even though IBM-Red Hat mandates it, I'm not a fan of Wayland. Furthermore, the restriction on form positioning is a minor inconvenience: it's impossible to share the clipboard with other applications (a security issue!), there's no Wine, no remote desktop, no Inkscape… and XLibre already offers Wayland's advanced features (Xnamespace, HDR resolution, etc.). But congratulations on being able to adapt it for fpGUI (and I would be very grateful if I could get some help to potentially do the same for MSEgui).
XLibre does it (by a modif in xrandr)
What is surprising is that Wayland includes XWayland, the X11 application converter which allows the positioning of forms on a Wayland session. |
Beta Was this translation helpful? Give feedback.
-
|
That's the goal. At a minimum I can put it on my github until it's possible for graeme to merge it if he want's. |
Beta Was this translation helpful? Give feedback.
-
|
@fredvs I just pushed my pascal only version https://github.com/andrewd207/wayland-pascal next I need to convert my local fpgui to use that and then I'll push it to my github. |
Beta Was this translation helpful? Give feedback.
-
|
And https://github.com/andrewd207/fpGUI/tree/wayland You have to Then If you run |
Beta Was this translation helpful? Give feedback.
-
|
@graemeg I made x11 or wayland runtime loadable. X11 is always available and if you use
|
Beta Was this translation helpful? Give feedback.
-
|
@graemeg : You dont need to install a VM with Wayland. First install the libraries: and then Weston: Start Weston from your X11 terminal. It will open as an ordinary desktop window: From the terminal of Weston, load + run the app. You may also compile the"pure" Waland app on X11 after install the Wayland libraries. |
Beta Was this translation helpful? Give feedback.
-
@andrewd207 : I try to I did change INFINITE by 9999999 only for testing but then there are other errors: |
Beta Was this translation helpful? Give feedback.
-
|
I used version information as attributes on the objects so it's not something that could be quickly changed to allow fpc3.2.2 to compile it |
Beta Was this translation helpful? Give feedback.
-
|
I just did some expirimenting and pasbuild doesn't like So on my system deleted the /usr/bin/ppcx64 file and made a symlink in Fair warning do this at your own risk :D and ofc everything you try to compile will use 3.3.1 by default which can cause you other problems. A better solution might be playing with your PATH variable to make sure it finds a 3.3.1 compiler first. That's probably safer. |
Beta Was this translation helpful? Give feedback.
-
|
Nah, sorry :) If it was a tiny change I'd do it but it changes the design. I was thinking you could make an executable bash script called fpc. it can just pass all it's options to ppcx64 3.3.1. Assuming it's on your system. pasbuild seems to really want "fpc" to be the name of the compiler you pass it. |
Beta Was this translation helpful? Give feedback.
-
|
I'll fix Pasbuild today, as the --compiler is supposed to work. Disclaimer: I've really only tested that argument for using Blaise compiler. Guess I still have a 'fpc' hardcoded somewhere. |
Beta Was this translation helpful? Give feedback.
-
|
@andrewd207 Thanks for helping.
Ok from /wayland-pascal-main i did:
Seems perfect: Then
And here some errors: And fpGUI fail to build from /fpGUI-wayland:
|
Beta Was this translation helpful? Give feedback.
-
|
@graemeg I guess it wouldn't be a problem for fpgui to depend on the wayland packages. But the problem I encountered was that any other project I make with pasbuild also needs to depend on the wayland packages if I use pasbuild. Shouldn't pasbuild automatically pull in sub dependancies without needing to add them directly to a project? This is why I made the plugin to "cheat" and just copy the ppu files into fpgui/framework. |
Beta Was this translation helpful? Give feedback.



Uh oh!
There was an error while loading. Please reload this page.
-
I revived the Wayland backend locally and with some help from claude it looks amazing. On wayland there is not always a window decorator and that makes the app/toolkit responsible for providing that. That's where I got stuck last time. There are extensions for wayland where those are provided. KDE provides that but Gnome/mutter doesn't.
Anyway now if on gnome it looks up what the theme is and draws a frame that looks and acts native. It also can just draw whatever it wants. there's a macos window frame built in with the three colored buttons.
Apart from that everything seems to "just work." Windows, menu's dialogs etc. It all looks the same. The one quirk I noticed but haven't looked into yet is mouse scrolling goes way to fast but I'm sure it's a quick fix.
I re-used my older bindings that link to libwayland client, but also in the meantime I've written a pure pascal versions that works directly to the Wayland file handle. It implements the wayland protocol from scratch. The one downside of that is that libwayland provides a nice way to load mouse theme's so that would also need to be re-written. Maybe I'll look at that today. The fpgui backend is still using the libwayland-client library - to be clear.
The performance is great too at least equal to x11.
Screencast.from.2026-06-18.09-58-45.mp4
The window border and the find dialog border is completely drawn with fpgui.
I'd love if it could be included in fpgui again. But also I think it would be great if at runtime it could choose x11 or wayland as the backend. That requires a proxy layer I imagine because currently TfpwWindow(not form) has TfpgX11Window as the ancestor class and you can't just switch an ancestor.
One wayland downside. For security reasons(?) wayland does not allow a client to set it's x/y position. You can position windows you own relative to each other.
Beta Was this translation helpful? Give feedback.
All reactions