mirror of
https://github.com/rust-windowing/winit.git
synced 2026-09-01 22:30:04 -04:00
Fix win32 window not closing when destroying it
This commit is contained in:
@@ -239,6 +239,7 @@ impl Window {
|
||||
impl Drop for Window {
|
||||
fn drop(&mut self) {
|
||||
use std::ptr;
|
||||
unsafe { ffi::PostMessageW(self.window, ffi::WM_DESTROY, 0, 0); }
|
||||
unsafe { ffi::wgl::MakeCurrent(ptr::null(), ptr::null()); }
|
||||
unsafe { ffi::wgl::DeleteContext(self.context); }
|
||||
unsafe { ffi::DestroyWindow(self.window); }
|
||||
|
||||
Reference in New Issue
Block a user