Show more

Got gtk4 client-side window decoration size details dynamically now - github.com/falkTX/wayland-audi

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

falktx boosted

KXStudio doing the Lord's work of maintaining Linux builds of a number of FOSS audio plugins:
kx.studio/Repositories:Plugins

#opensource #audio #linux

Never thought I would see a damn AI chatbot inside a DAW as an official feature πŸ˜•

This is not going to stop is it... 😞

Curious thing...
Font, window-title-bar and shadow size are different between gtk3 and gtk4.

This is on a stock Gnome desktop, installed today, no settings changed at all.

They look similar but have their inconsistencies.
Yay for client-side decorations! πŸŽ‰ 😒

Lazily loading gtk4 symbols in order to create a dummy window seems to work.
Also on gtk3.

Bless be wayland subsurfaces! πŸ™

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 wayland.app/protocols/xdg-deco

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

falktx boosted

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)

cdm.link/renoise-3-5-phrase-sc

actually the same code works on Qt6.9, so maybe nothing else needed...?

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?

github.com/falkTX/wayland-audi

the jalv gtk3 code is quite complex, I think it might be easier for me to add a little support in carla instead.

but really wish getting some wayland related pointers/data out of Qt was a bit easier..
without it I cannot do the fancy "keep plugin UI on top of carla" thing under wayland

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 github.com/falkTX/wayland-audi

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

falktx boosted
falktx boosted

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 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:

Show more
falkTX Mastodon

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!