Skip to content

Fix redraws not being scheduled correctly on macOS and iOS #2640

@madsmtm

Description

@madsmtm

As the title says, RedrawRequested occurs without a corresponding MainEventsCleared (and RedrawEventsCleared on macOS). Fundamentally, drawing inside kCFRunLoopBeforeWaiting is just plain incorrect.

Possible solutions:

  • Emit those events inside drawRect:
  • Fiddle with the event loop such that the queued RedrawRequested is drained quicker
  • Tweak NSView/UIView settings such that Window::request_redraw can just be [view/layer setNeedsToDrawRect:].

Some of the previous discussion:

And some references to myself:

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions