On Windows, fix RedrawRequested delivery
When calling `Window::request_redraw` from the `RedrawRequested` handler the `RedrawWindow` won't result in `WM_PAINT` being delivered due since user callback is run before `DefWindowProcW` is called. Track whether the user called `Window::request_redraw` and ask for `RedrawWindow` after running the said function during `WM_PAINT` handling. Fixes #3150.
This commit is contained in:
parent
c0db53a516
commit
98b3508aca
5 changed files with 24 additions and 9 deletions
|
|
@ -585,8 +585,7 @@ 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. **Calling this method from `RedrawRequested`
|
||||
/// event handler won't produce a `RedrawRequested` event**.
|
||||
/// is emitted in sync with any `WM_PAINT` messages.
|
||||
/// - **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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue