Yarn

Recent twts in reply to #jnfajzq

X11’s WM_NORMAL_HINTS property is a property that can be set on a window. Part of that property is width_inc and height_inc. They tell the window manager to only increase/decrease a window’s size by certain steps.

Terminal emulators like to set these values to the font size, so that when you resize the window the size “snaps” to the next increment and the terminal widget fits exactly into the window. It’s a bit hard to explain for me, so here’s a demonstration:

https://movq.de/v/7909ebc08a/st.mp4

That’s the st terminal.

It appears, Wayland does not have something like WM_NORMAL_HINTS, so this functionality has been removed from GTK 3. (You can still set this property on your window, but it’s convoluted and not part of the GTK toolkit, i.e. you have to use Xlib yourself. That makes everything very awkward.)

Hence in xiate, it looks like this:

https://movq.de/v/7909ebc08a/xiate.mp4

I kind of got used to that over time, but now that I use st every now and then, I realize how ugly and annoying xiate’s behaviour is. 🫤

⤋ Read More

I don’t know why or how, but using gtk_window_set_geometry_hints() has the desired effect (now?). Reading GTK’s source code is too convoluted to find out what’s going on here. I can’t find a corresponding Wayland protocol.

Sway gets very slow when resizing such a window, so I’m a bit inclined to think that GTK does some weird trickery to get this to work. 🤔

Either way, xiate now sets geometry hints again and floating windows have the correct size now. Finally.

⤋ Read More

Participate

Login to join in on this yarn.