Possible to add a "prefer CSD" option in KWin?

Some apps look better with CSD, but KWin always prefers SSD. Is it possible to let the user decide whether CSD or SSD should be preferred?

Hi! What are some applications where you’re running into issues with an application’s client-side decorations not being used? Just asking as I use several GTK/libadwaita applications on my device under Plasma, and they all look like regular “GNOME apps” with headerbars and everything, so I don’t know that I’ve seen the same behavior that you have.

For what it’s worth, it is possible to tell KWin to not draw a titlebar and frame when it otherwise would by using Window Rules:

…but that might be a workaround, and not the root cause, if you’re feeling like you need to do that to get an application to look correct.

Sorry for the inaccuracy in my post. In fact, I have only seen one application, namely Clash Verge (a Tauri app), that looks “broken” with Breeze SSD, and I did solve this by applying a window rule :slight_smile: . What I’m talking about is actually theming.

Let’s take LibreOffice as an example. Although LibreOffice has native Qt backend, gtk3 is the only one that makes input methods work properly on Wayland. And there are also many other apps powered by gtk3/4 that don’t use a GtkHeaderBar on Plasma, which means they follow KWin’s instructions on whether to use server side decorations.

For those apps, Breeze may not always look compatible with other parts of the application. In this case, forcing the use of CSD might make them look better.

The pitcure is LibreOffice on Plasma. We can, of course, specify a color scheme for this specific application. But such a window rule as “Use client side decoration” will offer more flexibility on theming.

Thanks for the screenshot - sorry, I’m probably missing something that’s clear to you, but what issues are you seeing in that screenshot? It looks like a standard dark-mode screenshot to me, but I’m not always the most visually perceptive on things related to color schemes and theming :slight_smile:

The color schemes are mismatched when I use a gtk theme other than Breeze. In other words, changing the gtk theme doesn’t make a difference to the title bar. My current solution is applying a special color scheme for title bars of gtk apps.

Just a clarification: KWin doesn’t prefer SSD, it honors whatever the app asks for. And it can’t forcibly do something different without risking breaking the app.

Many apps are known to work with CSD, like most gtk3/gtk4 ones, and I think users can take their own risk by enabling such a “prefer CSD” option.

When such an option is enabled, KWin may hide zxdg_decoration_manager_v1 to specific clients.