Flickering problems of canvas without focus on MacOS
Nobody has claimed this yet.
- Dominant language
- Racket
- Stars
- 68
- Forks
- 82
- PR merge metrics
- No merged PRs in 30d
Description
To reproduce:
- run this program
#lang racket/gui
(require mrlib/hierlist)
(define f (new frame% [label ""] [width 640] [height 480]))
(define hl (new hierarchical-list% [parent f]))
;(send hl set-scroll-via-copy #t)
(for ([i (in-range 1000)])
(send+ hl
(new-item)
(get-editor)
(insert (number->string i))))
(send f show #t)
- focus on other windows
- move the cursor to this window without focusing on it
- scrolling
This problem only occurs on Mac when racket window doesn't have focus. Also, uncomment the (send hl set-scroll-via-copy #t) can avoid this problem. Though I use hierlist in this example, it seems other canvas also have similar problems when updating without focus.
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 running the provided racket/gui reproduction with mrlib/hierlist on macOS, then compare scrolling while the window is focused and unfocused. Check the effect of set-scroll-via-copy and whether other canvas updates show the same flicker. Done means unfocused scrolling and canvas updates no longer flicker without requiring that workaround.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- macos
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100