-
Notifications
You must be signed in to change notification settings - Fork 175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add KDE server-decoration support #410
Conversation
Another thing I forgot: I'd like to hold off on the Anvil implementation until the API is signed-off on, just to prevent doing it twice. |
I've already stated it on IRC, but I wanted to make it public here too: I currently don't plan on putting more effort into this PR, because this is basically only needed for GTK so working on the GTK patch would likely be more time-efficient. That said, if someone else has more interest in this, feel free to clean it up. It should work as intended for anyone just trying to apply a temporary band-aid solution. I'll leave it up to @Drakulix / @vberger if you want to keep this PR open or not. Probably going to be easier for people to find if it's still open. |
Speaking of GTK patch, if someone is dedicated enough to work on it, here is an MR: https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/2191 that can be used as a starting point (it works as is, but it needs some work to be merged). This solution would work for both GTK3 and GTK4. I personally will not work on neither Smithay nor GTK solution, as GTK4 + libadwaita combo that will soonish become the main way of developing GTK apps, will not support SSD title bar anyway (as libadwaita window does not have title bar by default, it is added in app source code, and therefore we don't have control over it), maybe there is some way to design nice API for libadwaita to accommodate this, but I don't feel like working on it, especially because it reached 1.0 recently. So in libadwaita app enabling SSD would basically hide shadows and that's it, I'd rather respect it's CSD preference instead. |
Do you know if it still supports hiding the controls for tiled/maximized windows somehow? |
8b1038b
to
e9529db
Compare
Rewrote everything from scratch to port my fork to 0.30.0. Since this forces a more standardized API, this PR might actually be mergeable now. I don't plan to implement Anvil support, though it should be pretty trivial for someone else to do it if they're interested. But since this is basically just for legacy-support anyway I'm not sure if Anvil would want this. |
This implements the KDE server decoration support with the new 0.30.0 trait-based syntax. Doing so makes it possible to support custom decoration options for GTK applications.
e9529db
to
a05222d
Compare
Codecov Report
@@ Coverage Diff @@
## master #410 +/- ##
==========================================
- Coverage 30.21% 30.08% -0.13%
==========================================
Files 94 96 +2
Lines 15007 15068 +61
==========================================
- Hits 4534 4533 -1
- Misses 10473 10535 +62
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This should add a very rough implementation of the server decoration protocol. I've tested it and it seems to work as far as I can tell. My priority was mostly to implement this for myself to force server-side decorations for GTK, this PR is more of an accident.
It's probably somewhat rough around the edges, especially since I'm not particularly familiar with all the wrappers like
Global
/Main
/Resource
etc, so please let me know if you have any suggestions for improvements.