From cb0ceee9105ab192a4a235a185be983b5edd417a Mon Sep 17 00:00:00 2001 From: Daniel Collin Date: Thu, 9 Jul 2020 11:48:22 +0200 Subject: [PATCH] Use null for PeekMessageW on Windows --- src/os/windows/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/os/windows/mod.rs b/src/os/windows/mod.rs index ce7e614..40f5d85 100644 --- a/src/os/windows/mod.rs +++ b/src/os/windows/mod.rs @@ -763,11 +763,11 @@ impl Window { } } - fn message_loop(&self, window: windef::HWND) { + fn message_loop(&self, _window: windef::HWND) { unsafe { let mut msg = mem::zeroed(); - while winuser::PeekMessageW(&mut msg, window, 0, 0, winuser::PM_REMOVE) != 0 { + while winuser::PeekMessageW(&mut msg, std::ptr::null_mut(), 0, 0, winuser::PM_REMOVE) != 0 { // Make this code a bit nicer if self.accel_table == ptr::null_mut() { winuser::TranslateMessage(&mut msg);