Skip to content

Commit

Permalink
Add a note on Window::request_redraw on Windows
Browse files Browse the repository at this point in the history
Fixing this could require a massive rework to how redraw is handled
on windows to the point of removing `WM_PAINT`, since it's not reliable
by any means for our use case.

For now at least document that the API is broken. It was broken like
that for a long while.
  • Loading branch information
kchibisov committed Oct 21, 2023
1 parent 75b463a commit f3fb27c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,8 @@ impl Window {
/// ## Platform-specific
///
/// - **Windows** This API uses `RedrawWindow` to request a `WM_PAINT` message and `RedrawRequested`
/// is emitted in sync with any `WM_PAINT` messages
/// is emitted in sync with any `WM_PAINT` messages. **Calling this method from `RedrawRequested`
/// event handler won't produce a `RedrawRequested` event**.
/// - **iOS:** Can only be called on the main thread.
/// - **Wayland:** The events are aligned with the frame callbacks when [`Window::pre_present_notify`]
/// is used.
Expand Down

0 comments on commit f3fb27c

Please sign in to comment.