Skip to content

Add xcb dynamic loading support#99

Open
mwestphal wants to merge 7 commits into
dacap:mainfrom
mwestphal:dynamic_loading_xcb
Open

Add xcb dynamic loading support#99
mwestphal wants to merge 7 commits into
dacap:mainfrom
mwestphal:dynamic_loading_xcb

Conversation

@mwestphal

@mwestphal mwestphal commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

I agree that my contributions are licensed under the MIT License.
You can find a copy of this license at https://opensource.org/licenses/MIT

This adds supports for loading xcb dynamically instead of linking against it, by providing all needed symbols as function pointers.

TODO: Error management

Fix: #98
Fix: f3d-app/f3d#3326

@mwestphal

Copy link
Copy Markdown
Contributor Author

Error management is not done, I did not find a way to convey an clean error if the lib or a symbol is not available. There is an error code stuff but I'd need to be able to abort right during the manager creation.
In that case I usually would use an exception and document it in the API doc, but there is not a single exception in your API, please let me know.

@dacap

@mwestphal
mwestphal marked this pull request as ready for review July 7, 2026 05:51
@mwestphal

Copy link
Copy Markdown
Contributor Author

@Meakk please take a look

@dacap please review

@Meakk Meakk left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a few comments

Comment thread clip_xcb_functions.cpp Outdated
Comment thread clip_xcb_functions.cpp Outdated
@mwestphal
mwestphal requested a review from Meakk July 8, 2026 05:12
@mwestphal mwestphal changed the title xcb dynamic loading Add xcb dynamic loading support Jul 8, 2026
@Meakk

Meakk commented Jul 8, 2026

Copy link
Copy Markdown

Looks good to me but I think @dacap wanted to have a CMake variable to switch between link and dynamic load mode.
Let's see what they think about dropping the link mode.

@mwestphal

Copy link
Copy Markdown
Contributor Author

Looks good to me but I think @dacap wanted to have a CMake variable to switch between link and dynamic load mode. Let's see what they think about dropping the link mode.

Right, completely forgot about that.

@mwestphal

Copy link
Copy Markdown
Contributor Author

@dacap in the meantime I have added a simple exception system

@mwestphal
mwestphal force-pushed the dynamic_loading_xcb branch from d3092d9 to b0a7ba0 Compare July 14, 2026 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add X11/xcb dynamic loading to clip Add dynamic loading support for xcb usage

2 participants