-
Notifications
You must be signed in to change notification settings - Fork 569
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
wayland: remove top level decorator and other wlrootisms. #2127
wayland: remove top level decorator and other wlrootisms. #2127
Conversation
4902c26
to
204c291
Compare
8080d74
to
3d24db2
Compare
@maan2003 this PR hammers out the remaining bugs I had for my own application (layershell reinitialization issues, slowness during application initialization) and gets druid rendering on mutter (gnome's wayland compositor). I've covered what I think are the remaining issues in #1956 and filed issues. should mostly be minor issues and just unimplemented internal apis. most of the issues remaining I suspect also impact the X11 backend. good news everybody! |
@derekdreery your initial work was super helpful. thanks, we wouldn't be at this point without it. |
I think you should make this as optional features instead, xdg-decorations protocol is official extension used by other compositors, not just wlroots one. GNOME refuses to support it because they don't provide any server-side decorations (and uses deprecated kde decorations in gtk). If you completely remove this, then it will cause issues on e.g. KDE or any other compositor which uses custom server-side titlebars. |
You wrongly assert xdg_decoration is available. The proper fix here is to gracefully handle said protocol not being available and draw csd when the protocol isn't available. |
Oh and also the layer shell is not available on mutter, a runtime test for layers will be needed. |
As previously mentioned, XDG Decoration is an official protocol, it should not be removed. It's lack should just be gracefully handled like any other non-core protocol. (Maybe exept xdg-shell). Your layer shell change is correct tho, xdg decor should be handled the same way. |
@PolyMeilex Could you write a bullet point list of the changes you think should be made to this PR? |
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.
Could you write a bullet point list of the changes you think should be made to this PR?
Basically those review comments, besides that everything looks good.
XDG decor gives us free decoration whenever user forcefully unfullscreen the window, so removing this small bit of code would be a big regression.
People are welcome to implement CSD/SSD if they so choose. its not the point of this PR. which is about layershell fixes and toplevel initial config for application startup improvements (removes a noticeable and unnecessary delay during startup). but outside of that scope i'm not going to make additional changes. this PR is feature complete from my perspective. My end goal clearly communicated before starting this work was to focus on wlroot. I've done what I can without expending much effort for KDE/Gnome and 90% of the work is done. but others will have to take it over the finish line. feel free to implement the features you feel are missing. @i509VCB - runtime test is already implemented when it checks the registry for the layershell interface. @xStrom just going to bump to get this merged in. seems like its attracting unrelated comments and wish list items vs relevant reviews. |
yes. it was already causing issues which is why I removed it. it was incorrectly implemented logic. the goal wasn't to fix it for every platform; the goal is to clean it out so someone implement it correctly later without confusion from pre-existing (and broken) code. |
Oh sorry, just by reading the PR and the linked issue I wrongful assumed that this PR is meant to fix something, but the point is just removal, not a fix. That was most likely discussed somewhere else, my bad. Have a nice day. |
@PolyMeilex understandable; title is confusing given the decorations being removed (since they're a general api as noted). basically the top level decorations predate my work. there where a bunch of partially implemented areas. I've fixed up most of them; but CSD and SSD are of little interest for my work and this allows the application to render its contents on mutter and wlroots. I'm assuming it'd also render on KDE. i decided it was better to let someone start with a clean slate if they decided that area interested them vs having a broken partial implementation lying around causing issues and confusion. |
@james-lawrence Thanks for explaination, got confused by title and my goal with druid was to build shell for my compositor using layershell and bunch of apps which will require xdg decor for SSD 🥲 |
@PolyMeilex it does fix an issue; right now in main there is a 1sish delay during startup and some issues with restoring layershell when a monitor restarts. the CSD/SSD stuff also caused bugs due to not being implemented properly. @maan2003 is there any interest in pulling this in if I resolve the conflict? otherwise I'm liable to just unsubscribe and stop watching =) |
I don't necessarily agree with the mindset, but I'm fine with the change btw, at least druid will start up without the need to edit the source code. |
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!
Here is my understanding:
We were using xdg_decoration, which is not supported by mutter. The implementation had bugs which causes delay during startup.
So for now, we are just removing the top level decorator.
I will be able to test in 2-3 days.
Those are two unrelated changes as far as I know. Binding a protocol or even version that is not advertised by the compositor is treated as error in Druid. Therefore druid does not run at all on reference implementation Weston and Gnome's Mutter. As it expects optional xdg-decoration protocol and nonstandard layer shell. This PR removes xdg decor and makes layer shell optional and binds it only if available. Second part of the PR fixes toplevel initialization speed, by changing the order a bit. And I think it also fixed a deadlock in WlOutput code for me. |
People on this thread seem to know a lot more about Wayland than I do, and so I won't comment on the details, but it does seem to me that whichever way that discussion goes this PR is an improvement over what is already there, and so we should get it merged ASAP. Nothing here stops us from modifying or reverting part of changes in the future, if it becomes necessary. |
allows us to remove calculating the initial window size from the outputs and instead rely on wayland directly.
3d24db2
to
2a14b8b
Compare
@maan2003 all cleaned up and ready to go. thanks as always. |
resolves obvious issues with running on a mutter wayland compositor.
fundamentally this allows druid applications to render on mutter using wayland.
fixes #2126