pop-os / cosmic-epoch

Next generation Cosmic desktop environment
2.8k stars 78 forks source link

[Bug] Qt apps using CSD rather than SSD #542

Open thatLeaflet opened 1 month ago

thatLeaflet commented 1 month ago

Despite supporting server side decorations, the Qt apps I've tested (Prism Launcher and OBS Studio, both from Flathub) use client side decorations rather than server side decorations. On Plasma, Xorg Gnome, and Cinnamon, they use SSD.

screenshot-2024-08-09-13-21-28

Drakulix commented 1 month ago

This is by design, cosmic-comp doesn't force SSDs on apps that support both.

thatLeaflet commented 1 month ago

My impression from most Qt developers is that the intention for to server side decorations to be used, but the fallback is needed for desktops like Gnome Wayland that only support CSD. Of course there are Qt apps that intend for CSD to be used, in which case Cosmic shouldn't use SSD.

So for these apps to use SSD on Cosmic, would the app developers need to specify that they prefer SSD or is this a limitation with Qt's implemention of the XDG Decoration protocol?

ids1024 commented 1 month ago

Looking at WAYLAND_DEBUG=1 obs logs, it shows

[1466686.158] {Default Queue}  -> zxdg_toplevel_decoration_v1#49.unset_mode()

Which is defined to mean "Unset the toplevel surface decoration mode. This informs the compositor that the client doesn't prefer a particular decoration mode." - https://wayland.app/protocols/xdg-decoration-unstable-v1#zxdg_toplevel_decoration_v1:request:unset_mode

So the client is claiming it doesn't have a preference, and cosmic-comp chooses CSDs as the default. If Qt wants to favor SSDs like that, it should use set_mode to request that. So I don't think this is a bug.

Cosmic-comp could also have a configuration option to choose whether to prefer CSDs or SSDs.

Lenni-builder commented 3 weeks ago

I'd prefer apps that are meant to use a SSD to use one (similar to how it's handled on KDE Plasma) since the CSDs those apps have are very basic because they're just meant to be used as a fallback and don't blend in with Cosmic's decorations at all. This CSD/SSD issue on GNOME is very annoying and it would be sad to see a similar issue on COSMIC, especially since SSD support is implemented already.