Skip to content

macOS: keep redraws requested through WindowWaker during a frame - #373

Open
kovaacs wants to merge 1 commit into
RustAudio:masterfrom
kovaacs:macos-waker-redraw
Open

kovaacs wants to merge 1 commit into
RustAudio:masterfrom
kovaacs:macos-waker-redraw

Conversation

@kovaacs

@kovaacs kovaacs commented Nov 18, 2026

Copy link
Copy Markdown

Fixes #372.

WindowWaker::request_redraw_after now also sets state.redraw_requested, as WindowContext::request_redraw does, so trigger_frame keeps the display link running for a redraw requested while draw() runs.

Tested on macOS: an editor embedded in an NSWindow test host that asks for its next frame through the waker during draw() went from 1 frame and then none to about 120 frames a second, and a CLAP plug-in using egui-baseview 0.9 in Bitwig 6.1 animates again without mouse movement.

It could instead share one helper with WindowContext::request_redraw; I kept it to the one line, but I'm happy to change it.

WindowWaker::request_redraw_after now also sets state.redraw_requested,
as WindowContext::request_redraw does, so trigger_frame keeps the
display link running for a redraw requested while draw() runs.

Fixes RustAudio#372
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

macOS: a redraw requested through WindowWaker while a frame draws is lost; the window stops drawing until the next input event

1 participant