rust-windowing / rust-windowing/winit
Query Z-order / window level
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 6.2k
- Forks
- 1.3k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 9
Description
Hi, I have a use case for knowing the Z ordering of all visible windows. I searched through the issues and PRs, and I think that #2534 and #1883 are almost what I'm looking for, except that they don't have a way of querying what the current Z order is. Is it possible/easy/reasonable to add a new WindowEvent variant that reports the window's current on-screen order? Something like ZOrderChanged(i64)? The value of the number is the ordering depth, with 0 being the front-most ('closest' to the camera). Negative values aren't allowed, but if there are platforms that don't use unsigned integers for this request, they still need to be able to be supported. Note that there will have to be a way of directly asking a window what its Z order is, so that users don't have to keep track of that information themselves, or force it in some manner (current_z_order(&self) -> Result<i64, NotSupportedError> would be my choice).
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 reviewing related issues and PRs #2534 and #1883, then inspect the existing WindowEvent API and window-query entry points. Define how a current Z-order query and change notification would behave across supported platforms, including unsupported cases; done means the API contract and platform coverage are settled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- desktop
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100