-
Notifications
You must be signed in to change notification settings - Fork 1.2k
ControlFlow::Wait suspends app even if redraw is requested. #1619
Copy link
Copy link
Open
Labels
C - needs investigationIssue must be confirmed and researchedIssue must be confirmed and researchedDS - win32Affects the Win32/Windows backendAffects the Win32/Windows backend
Description
I set flow to ControlFlow::Wait in order to not waste CPU on doing nothing.
When application calls Window::request_redraw() I would expect RedrawRequest to arrive right away (after MainRequestCleared if there are queued events). Yet no ReadrawRequest is received until other events happen. Particularly if mouse and keyboard are untouched app would wait for ReadrawRequest indefinitely.
I tried to call Window::request_redraw() at different moments. Nothing helps. Then I found that using ControlFlow::Poll causes RedrawRequest to be received as expected, without any input.
Is it expected behavior? I couldn't find anything like this in the docs for ControlFlow.
Platform: Windows 10.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
C - needs investigationIssue must be confirmed and researchedIssue must be confirmed and researchedDS - win32Affects the Win32/Windows backendAffects the Win32/Windows backend