rust-windowing / rust-windowing/winit
Allow the creation of XConnection using an existing connection handle?
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 6.2k
- Forks
- 1.3k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 9
Description
I'm using glutin which exports many functions from this crate. I already have a connection open to X and I'd like to share my connection with winit; would it be a good idea to add a constructor to XConnection that takes in an existing *mut xlib::Display?
EDIT: just peeked into the code and noticed that a Mutex was already used for X11_BACKEND before XConnection::new is called so this might actually be a bit more complicated..
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading XConnection::new and the X11_BACKEND initialization, then inspect how the existing *mut xlib::Display handle is represented and synchronized. Define whether a constructor can safely accept a caller-owned connection for sharing with glutin, and consider the Mutex interaction before determining the API and tests needed to demonstrate that the handle works.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- desktop
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100