Wayland xdg-decoration support
Roadmap or todo suggestion
Detailed Description
Kodi should support the unstable xdg-decoration Wayland protocol so it can use native window borders in windowed mode on Linux/Wayland
Context
The custom borders are a fill-in and look fugly :-)
Possible Implementation
Additional context, screenshots or links
Here are some relevant links or screenshots
https://github.com/wayland-project/wayland-protocols/blob/master/unstable/xdg-decoration/xdg-decoration-unstable-v1.xml
Note: Team Kodi will consider this item however we will not make any promises if it will be included.
Alternative: https://gitlab.gnome.org/jadahl/libdecoration
If Kodi decides to use libdecoration for client-side decorations, I am happy to help with the porting. I am a main contributor to the project and implemented the libdecoration support for GLFW, SDL and Blender.
@christianrauch I'd definitely be interested, can you summarize the current state of libdecoration? Is it API-stable?
Can you summarize the current state of libdecoration? Is it API-stable?
It has not been officially deemed API stable yet. The implementations in GLFW, SLD and Blender are not upstreamed yet, and we are mostly looking for feedback from "real-world" applications and their needs/requirements. The API might change if required to support functionality requested by clients.
I don't see any reason why we can't try it if we can make the dependency optional and the code changes flexible :smile_cat:
For what it's worth, libdecor is now API/ABI stable and used by SDL, FLTK, and several others. It's reasonable to rely on these days.
That's great to hear! From what I remember, it might still make sense to implement xdg-decoration, though, so that we can interact better with WMs that don't want to have decorations anyways (like tiling WMs).
You can control it with libdecor, including exposing a mode where you don't draw them.
This would be appreciated for RPiOS. The decorations were deemed too ugly, so we've hacked the internal decoration support out and enable decorations server side. e.g. for labwc:
<windowRules>
<windowRule identifier=“Kodi" serverDecoration=“yes" />
</windowRules>
Supporting this in a less hacky way would be good.
SDL's implementation might show a simple way to use libdecor.
Supporting native window borders / decorations would be great as it would finally allow me to use the "Klassy" window decorations that I'm using for years on KDE Plasma and all KDE and even non-KDE, but still Qt programs support just fine and even a few popular non-Qt like Firefox and VLC supports just fine: https://github.com/paulmcauley/klassy The one that Kodi has in windowed mode are really bad, especially compared to Klassy and they look out of place. If they cannot be replaced by default, we should at least have an option to be able to switch the the default / native / custom window decorations that we want, like Firefox and Chromium lets us choose.