Skip to content

Commit

Permalink
Prevent this branch from making #1484 worse
Browse files Browse the repository at this point in the history
  • Loading branch information
Osspial committed Apr 19, 2020
1 parent f3ceee2 commit 8109109
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/platform_impl/windows/event_loop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -727,6 +727,13 @@ unsafe extern "system" fn public_window_callback<T: 'static>(
) -> LRESULT {
let subclass_input = &*(subclass_input_ptr as *const SubclassInput<T>);

winuser::RedrawWindow(
subclass_input.event_loop_runner.thread_msg_target(),
ptr::null(),
ptr::null_mut(),
winuser::RDW_INTERNALPAINT,
);

// I decided to bind the closure to `callback` and pass it to catch_unwind rather than passing
// the closure to catch_unwind directly so that the match body indendation wouldn't change and
// the git blame and history would be preserved.
Expand Down Expand Up @@ -1886,6 +1893,15 @@ unsafe extern "system" fn thread_event_target_callback<T: 'static>(
let subclass_input = &mut *(subclass_input_ptr as *mut ThreadMsgTargetSubclassInput<T>);
let runner = subclass_input.event_loop_runner.clone();

if msg != winuser::WM_PAINT {
winuser::RedrawWindow(
window,
ptr::null(),
ptr::null_mut(),
winuser::RDW_INTERNALPAINT,
);
}

// I decided to bind the closure to `callback` and pass it to catch_unwind rather than passing
// the closure to catch_unwind directly so that the match body indendation wouldn't change and
// the git blame and history would be preserved.
Expand Down

0 comments on commit 8109109

Please sign in to comment.