Skip to content

Commit

Permalink
Implement request_close() support for Windows in druid-shell
Browse files Browse the repository at this point in the history
  • Loading branch information
tay64 committed Sep 16, 2020
1 parent 490d4e6 commit cf23f92
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions druid-shell/src/platform/windows/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1023,6 +1023,15 @@ impl WndProc for MyWndProc {

Some(0)
}
WM_CLOSE => {
if let Ok(mut s) = self.state.try_borrow_mut() {
let s = s.as_mut().unwrap();
s.handler.request_close();
Some(0)
} else {
None
}
}
DS_REQUEST_DESTROY => {
unsafe {
DestroyWindow(hwnd);
Expand Down

0 comments on commit cf23f92

Please sign in to comment.