Window corners behave strangely when decoration remove

I have noticed that (at least in gtk 4) when I set decorated to false for a window, the corners are no longer round. Might be how it works, the problem is that if I still try to set the corners radius with CSS

window { border-radius: 8px }

they don’t stay round and switch back to square randomly. As I drag the window around the round borders seem to appear only when the window is in certain parts of the screen or only when it’s moving.

You think I have to do something else or might it be some glitch?

You’re applying the rounded corners to the window, but the window’s child will not be clamped to them.

You want to add some padding to the contents of the window, so they don’t draw outside the window’s area.

I did window { border-radius: 8px; padding: 8px }, for example, but it doesn’t fix the issue and the padding goes around everything, including the header.

Must be something else

You lilely don’t want to set decorated=false, that’s not what it’s for.

If you want to remove the title bar rather than all decorations (incl. shadows, rounded corners etc etc), put a invisible widget there or use AdwWIndow which does exactly that underneath.

Mmmm… Sorry for interrupt this, but… do you mean that putting “decorated=false” removes absolutely all decorations? Because I received this bug in DING, where the lower shadow is shown in a window with “decorated” set to false… weird borders with dash to dock (#196) · Issues · Sergio Costas / Desktop Icons NG · GitLab

Maybe their theme is doing something weird, or it’s different between X11 and Wayland. It works fine here, in both GTK4 and 3.

That’s what I suspect too. Thanks, and sorry for the noise O:-)

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.