[View] `do-events/no-wait` processes only ONE event
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Domain
- desktop, operating-systems
Research direction
Start in modules/view/backends/windows/events.reds around the do-events/no-wait implementation at the referenced line, and compare it with the older version linked in the issue. Reproduce the behavior with the supplied view example on Windows. Done means one call processes all queued window messages before returning, rather than only one event.
Written by the indexing model from the issue text.
Description
Describe the bug
I would expect do-events/no-wait to process all queued events before returning, but it processes only one event (likely a leftover from the 2015 version of it). Otherwise I have to call it in a loop a lot of times to be sure.
To reproduce
I'm running mouse click simulations, but here's a silly example:
view [
b: base on-down [n: n + 1]
button "hit me" [
n: 0
b/color: red
loop 10 [do-events/no-wait] ;) multiple calls only to force it to renew b/color
wait 3
b/color: gray
loop 10 [do-events/no-wait]
print [n 'presses 'detected]
]
]
- Click the button, observe the base turning red
- Click the base many times during 3 seconds (until it becomes gray again)
- Observe the message in the console: 10 calls to
do-eventscan detect up to 4 clicks (other 4 times are likely wasted onon-upevents, another 2 onb/color)
Expected behavior
A single call to do-events/no-wait empties the window message queue.
Platform version (please complete the following information)
Red 0.6.4 for Windows built 20-Dec-2019/19:03:46+03:00 commit #544a6e1
- Dominant language
- Red
- Stars
- 6k
- Forks
- 416
- PR merge metrics
- No merged PRs in 30d
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.
More from red/red
-
type.bug
-
type.bug type.GC
-
GUI.GTK
Difficulty 3/5 1-2 days Newbie friendliness 55/100
-
GUI.GTK
Difficulty 3/5 1-2 days Newbie friendliness 58/100
-
type.bug type.GC
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
extension extension: raycast-system-monitor feature request platform: macOS
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
raycast/extensions#31335 · 2 comments ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
AvengeMedia/DankMaterialShell#3520 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
SubtitleEdit/subtitleedit#15108 · 1 comment ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100