Skip to content

ControlFlow::Wait suspends app even if redraw is requested. #1619

@zakarumych

Description

@zakarumych

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C - needs investigationIssue must be confirmed and researchedDS - win32Affects the Win32/Windows backend

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions