Immediate-Mode-UI / Immediate-Mode-UI/Nuklear
[BUG, BACKEND: D3D9] Clipboard paste broken for D3D9 backend
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 11.4k
- Forks
- 686
- Avg merge
- 4d 1h
- Merged PRs (30d)
- 3
Description
The clipboard paste functionality in the Nuklear D3D9 backend is broken due to an incorrect check when opening the clipboard. In the current implementation of `nk_d3d9_clipboard_paste`:
https://github.com/Immediate-Mode-UI/Nuklear/blob/fcd64f85e54b9d35eee13347748d70fa4d2e134e/demo/d3d9/nuklear_d3d9.h#L484-L486
This differs from other DirectX backends (D3D11, D3D12), where the paste function works correctly and this bug does not occur.
**As enhancement**. However, it is worth noting that even in those backends the order of operations is somewhat questionable: they call `IsClipboardFormatAvailable` before opening the clipboard with `OpenClipboard(NULL)`.
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 in demo/d3d9/nuklear_d3d9.h around nk_d3d9_clipboard_paste at lines 484-486. Compare its clipboard-opening check with the working D3D11 and D3D12 paste implementations, including their operation order. Done means clipboard paste works correctly in the D3D9 backend.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 56/100