Skip to content

Commit

Permalink
Fix linebender#265 PostQuitMessage when WM_DESTROY in Win
Browse files Browse the repository at this point in the history
  • Loading branch information
usagi committed Mar 17, 2020
1 parent 0cb0216 commit be16762
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions druid-shell/src/platform/windows/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -957,6 +957,10 @@ pub(crate) unsafe extern "system" fn win_proc_dispatch(
}
};

if msg == WM_DESTROY {
PostQuitMessage(0);
}

if msg == WM_NCDESTROY && !window_ptr.is_null() {
SetWindowLongPtrW(hwnd, GWLP_USERDATA, 0);
mem::drop(Rc::from_raw(window_ptr));
Expand Down

0 comments on commit be16762

Please sign in to comment.