From 28cdce99c09a4c6ac8e55a591bee9293e81a4878 Mon Sep 17 00:00:00 2001 From: gzp Date: Fri, 28 Jul 2017 13:09:50 +0200 Subject: [PATCH] replace wm_destroy by wm_close --- src/platform/windows/events_loop.rs | 2 +- src/platform/windows/window.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/platform/windows/events_loop.rs b/src/platform/windows/events_loop.rs index 6f34c0a0..e9374fa4 100644 --- a/src/platform/windows/events_loop.rs +++ b/src/platform/windows/events_loop.rs @@ -281,7 +281,7 @@ pub unsafe extern "system" fn callback(window: winapi::HWND, msg: winapi::UINT, -> winapi::LRESULT { match msg { - winapi::WM_DESTROY => { + winapi::WM_CLOSE => { use events::WindowEvent::Closed; send_event(Event::WindowEvent { window_id: SuperWindowId(WindowId(window)), diff --git a/src/platform/windows/window.rs b/src/platform/windows/window.rs index d0f1189b..16ac42c1 100644 --- a/src/platform/windows/window.rs +++ b/src/platform/windows/window.rs @@ -282,7 +282,7 @@ impl Drop for Window { #[inline] fn drop(&mut self) { unsafe { - user32::PostMessageW(self.window.0, winapi::WM_DESTROY, 0, 0); + user32::PostMessageW(self.window.0, winapi::WM_CLOSE, 0, 0); } } }