start work on implementing libdecor for csd #1349
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 off 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!