-
-
Notifications
You must be signed in to change notification settings - Fork 180
start work on implementing libdecor for csd #1349
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
base: main
Are you sure you want to change the base?
start work on implementing libdecor for csd #1349
Conversation
this change dynamically loads the libdecor library to render client side decorations, this is useful for compositors that do not support server side decorations on wayland.
not a great solution but if the core_window is set before the keyboard listener sets the values for libxkbcommon they are null for the rest of the window initialization
CC: @RonaldZielaznicki |
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.
Alright, finally got a time to sit down and look this over. Thank you again for getting this in place. Cause this does follow the logic we laid out in #1298.
As an aside, I'm wondering if we can't do something to shift all the conditions choosing between libdecor and ssd into one place, but I'm ok for some repetition as long as it works. We can clean anything too bothersome up later on.
move exit check earlier and remove if condition inside while loop
I thought about how we could move all the logic thats conditionally selecting behavior between libdecor and wayland but couldn't organize it in a great way :/ |
You didn't need to worry much about getting everything switched around. As I was happy with the movement of the conditional we discussed here. Otherwise, thank you for the changes! |
This PR introduces libdecor to the wayland backend to help render client side decorations. See this issue for more context: #1298
This is a screenshot of the core-triangle example running with client side decorations,

I'm testing on nixos with gnome mutter which does not support server side decorations, from the logs, the error:
No longer shows!
Here is an example of falling back to ssd rendering if libdecor is not available:

This PR is a bit incomplete however, things like resizing are still wonky: (updated added back the code that attempts to recreate the swapchain but causes a segfault for me, if this is removed the behavior looks like the attached video: )
Screencast From 2025-02-18 11-45-01.webm
Other things I'm not sure about
Introduced an issue where a keyboard press causes a crash inThis might of been an issue before my changes, it looks like the keyboard listener was not getting called before the core window would be written with null values for the xkb variables, causing a crash becauselibxkbcommon
's interfacewl.xkb_state
was null whenkeyboardHandleKey
was called, this appears to be fixed with anotherwl_display_roundtrip
call which doesn't feel like a great solution, but no sure how else to handle this :/This is also my first PR to mach so additional feedback / guidance is appreciated :)
Feel free to push changes to the fork as well!