My progress in Wayland compatibility layer

Super hot!

On a different note and not necessarily relevant to this topic.

How hard would it be to develop a Haiku GTK theme to help get Haiku GTK apps at least looking more at home?

Found two themes at gnome-look.org:

There is also the link to GitHub repo.

Maybe it is somehow useful.

Should be possible for GTK3 apps, but it would be much harder for GTK4 applications that use libadwaita; that is, if not totally impossible for libadwaita apps to be themed close enough for Haiku integration (button style, scrollbar style, etc.).

It seems to me that libadwaita would be far easier?

I have already done some work with gtk4 and libadwaita.
Some progress:

photo_2023-03-02_20-16-27

photo_2023-03-02_20-13-54

31 Likes

If i’m not mistaking libadwaita is used in both GTK’s, one of its purposes (if not the only one) is give gtk apps a default theme if no specific themes are not used, it’s basically the c/c++ (non css) version of the adwaita theme.

Nope, libadwaita is used only in GTK4. It is a platform library (GNOME platform for this one) that gives custom widgets for applications to use designed around the Adwaita theme, on top of what base GTK4 provides.

The first image, does that use libadwaita or just GTK4?

It’s standard GTK4 demo

2 Likes

Awesome work!

1 Like

Finally having Haiku running on hardware, and it is great to see how great GTK is working and that there is a great working browser!

I, of course, hope for native browser working just as good, but limited development resources, this is awesome :clap:

5 Likes

Finally I was able to try the new applications that use the compatibility layer on bare metal, and the experience is simply breathtaking. Browsing without worries about crashing and stalling is simply awesome. After a long time, the OS feels snappier too!

4 Likes

I managed to run Qt6 with Wayland backend. Qt Wayland backend is compiled on Haiku with almost no changes. It currently have some trouble with decorations and input, but seems not hard so fix.

Used Qt Wayland backend source code: GitHub - qt/qtwayland: A toolbox for making Qt based Wayland compositors.

31 Likes

Just for experimentation, I guess? The native QPA will doubtless be better integrated with the rest of the OS.

1 Like

The same can be said on Linux itself though …kinda intentional what they did with that. That may be desirable for some cases like browsers perhaps, at least they had some rationale for doing that.

First it allows to implement and test EGL support both on Wayland/Mesa and on Qt side. Qt native QPA plugin EGL support can be written referencing Qt Wayland code.

Second it revealed some bugs in Haiku Wayland implementation with repaint requests that is nice to be fixed. It is good idea to test various toolkits with Haiku Wayland to improve its quality.

12 Likes

Some progress on Wayland EGL. Managed to build Mesa EGL with Wayland enabled. Actual Wayland output is not implemented yet.

> wayland-egl
wl_ips_client_connected
display: 0x115c0bfcd1a0
client: 0x115c0c005fd0
haiku_initialize
  _EGL_PLATFORM_WAYLAND
VideoStreamsWsi: vkEnumerateInstanceExtensionProperties
VideoStreamsWsi: vkEnumerateInstanceExtensionProperties
VideoStreamsWsi: vkCreateInstance(0x115c0c18bde0)
signature: "radeon_gfx.accelerant"
path: "/boot/home/config/non-packaged/add-ons/accelerants/radeon_gfx.accelerant"
+ThreadLink(), thread: 2341
/boot/home/Tests/GL/libdrm2/build.x86_64/install/data/libdrm/amdgpu.ids version: 1.0.0
[!] ../radeon_gfx.accelerant/RadeonGfxAccelerant.cpp:408: error 0x80007009 (Function not implemented)
[!] ../radeon_gfx.accelerant/RadeonGfxAccelerant.cpp:408: error 0x80007009 (Function not implemented)
WARNING: radv is not a conformant Vulkan implementation, testing use only.
VideoStreamsWsi: vkEnumerateDeviceExtensionProperties
VideoStreamsWsi: vkEnumerateDeviceExtensionProperties
VideoStreamsWsi: vkEnumerateDeviceExtensionProperties
VideoStreamsWsi: vkEnumerateDeviceExtensionProperties
VideoStreamsWsi: vkCreateDevice
instance: 0x115c0c00a210
WARNING: Some incorrect rendering might occur because the selected Vulkan device (AMD Unknown (RADV VERDE)) doesn't support base Zink requirements: 
scalarBlockLayout OR EXT_scalar_block_layout haiku_create_window_surface
Kill Thread
31 Likes

I managed to run Linux Wayland applications in Haiku with Waypipe (thing that brings network transparency to Wayland, something like X11 SSH forwarding). Wayland applications are executed on separate physical machine running Linux and its windows are displayed on Haiku using Haiku Wayland compatibility layer.

Unlike Wayland in-proc server, Waypipe requre proper socket-based Wayland communication, so new transport layer is needed for Haiku Wayland server. It is currently some kind of works, but incomplete. libwayland built-in socket event loop can’t be used because it is hard-coded to Linux-only epoll API.

32 Likes

Maybe these links will help:

https://mail-index.netbsd.org/pkgsrc-wip-changes/2019/08/18/msg014105.html

https://lists.freebsd.org/pipermail/freebsd-current/2016-August/062969.html

1 Like

This is amazing, well done.