rust-windowing / rust-windowing/winit
macOS: (in window example) redundant redraw request during resizing
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 6.2k
- Forks
- 1.3k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 9
Description
Description
First off, you can observe this bug in the window example, but it probably applies to any consumer that requests a redraw on SurfaceResized. I noticed it while working on a different PR.
I think this might be because our drawRect override sends a redraw request every time the window bounds change, but so does the application after receiving WindowEvent::SurfaceResized. or AppKit just calls drawRect twice for some reason.
macOS version
ProductName: macOS
ProductVersion: 12.7.6
BuildVersion: 21H1320
Winit version
master (0b6b794f012b5e82e0600cd4ed41f84f9fc76023)
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 with the macOS window example and trace the drawRect override alongside handling of WindowEvent::SurfaceResized. Compare each path's redraw request during resizing, then verify the finished change no longer causes a redundant redraw while preserving the required resize redraw behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- macos, rust
- Domain
- desktop, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100