Follow

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

Sign in to participate in the conversation
falkTX Mastodon

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