Got gtk4 client-side window decoration size details dynamically now - https://github.com/falkTX/wayland-audio-plugin-test/blob/51b301ef46fc9d20d96716a3ce1c5589b66344cf/gtk4-host.c#L31-L62
No need for super hacky "render window offline and then fetch position based on pixels", instead it is just:
1. create dummy window
2. fetch its initial size (200x200 on my laptop)
3. add a title bar
4. get title bar size and updated window size
5. x,y offsets are (new size - old size) / 2
picture shows this working nicely, I have an intentional 20px padding around the yellow rectangle
KXStudio doing the Lord's work of maintaining Linux builds of a number of FOSS audio plugins:
https://kx.studio/Repositories:Plugins
I tried to plug into gtk4 just for it to create a dummy window for me, idea being that then I don't need to deal with any of this lack-of-server-side-decoration business.
Well that presents its own problems, the wayland surface from the gtk4 window includes the shadow and decorations, also the size requested on start includes those too?? so I always get a smaller "window area" than expected, and I guess I now need to find that offset too somehow π€
Many hoops just to have window controls π‘
Yeah I really hate client-side decorations π‘
From top to bottom:
1. Firefox is able to follow Gnome desktop settings, as it uses Gtk on the lower level π
2. Konsole being KDE and based on Qt is not Gtk related, just makes assumptions on what decorations should be used
3. Carla being Qt behaves the same
4. Steam does its own thing, but also assumes what decorations should be used
I really thought Qt&KDE apps would behave better π
PS: Yes I prefer my window buttons on the left side
I mean, the app can request the compositor to have "server-side decorations" but this is treated as optional protocol.
See https://wayland.app/protocols/xdg-decoration-unstable-v1
It is implemented on all major desktops except Gnome π
So now all apps need to implement their own decoration, user resizing, etc feels very backwards and wasteful.
The way some compositors implement some features and some not is a bit annoying, but the main features are well supported overall.
Now to get DPF to support wayland... π
2 / 2
After a few days writing code and running tests directly with wayland APIs... I like it! π
It is quite different from X11, but so is doing Windowing and events on macOS and Windows. So it is kinda like another platform altogether.
The way of dealing with "protocols" feels a little weird at first, but I can really appreciate the extensibility provided and a centralized place for them.
So far there is only 1 thing I hate - client-side decorations.
1/2
Breaking - Renoise, the powerful tracker-based DAW, now has a new open-source live coding environment for generating phrases called pattrn.
If you ever wanted to code @tidalcycles notation inside a tracker, welp...
There's a lot more, too; let me break it down. (Mac, Windows, Linux, Linux ARM and RasPi)
Got wayland subsurface-as-plugin-UI now working for Qt6 hosts now too!
Though because it needs to access private APIs the code looks a bit "special" π
But I think it should be possible to expand the supported Qt versions by adding a couple of these...
What do you think, too nasty?
embedding custom wayland UI stuff on top of gtk3 and gtk4 based applications works! π
the gtk APIs to get down to the wayland surface are a bit awkward, but at least its accessible.
I tried the same with Qt6 and couldn't find a way to have it return the underlying wl_surface pointer. π€·
I got an LV2 plugin UI with this setup working, but no hosts to try it out against.
Modifying jalv.gtk3 is likely the easiest path... π€
WIP test code dump at https://github.com/falkTX/wayland-audio-plugin-test
doing some experiments with wayland and audio plugin UIs...
I have seen a proposal for that relies on a lot of proxy setup, but really don't like it.
so I did some tests with subsurfaces, and it seems very promising.
I have a big host window providing its surface to a "plugin" window for which it creates a subsurface to draw on.
Then the host can take control over subsurface for positioning, z-index, etc
Event input works with this approach too.
boring screenshot: grey = host, yellow = plugin
(Double-) week highlights: new releases of @GIMP, @darktable, Cardinal by @falktx; new features in @FreeCAD and @FreeCAD
This year's #linuxaudio conference in Lyon was hot (literally 36+ degC). A personal highlight was Fons Adriensen's presentation on Tape Emulation. I learned how tape heads work in detail.
Many thanks to Romain Michon and team for organizing this event.
Recordings of the sessions are available at https://www.youtube.com/@gramecncm
It was fun to meet old friends and make some new ones. It was also exciting to have the scientific presentations in a hall named after a hero: