From 73ca6660111ae1a6b83fa6a9f0f9b184f5278ad3 Mon Sep 17 00:00:00 2001 From: Evan Martin Date: Wed, 5 Jun 2024 18:35:31 -0700 Subject: [PATCH] ValidateRect for whole window --- win32/src/winapi/user32/paint.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/win32/src/winapi/user32/paint.rs b/win32/src/winapi/user32/paint.rs index 1d95fb21..eb8f677a 100644 --- a/win32/src/winapi/user32/paint.rs +++ b/win32/src/winapi/user32/paint.rs @@ -25,8 +25,14 @@ pub fn InvalidateRect( } #[win32_derive::dllexport] -pub fn ValidateRect(_machine: &mut Machine, hWnd: HWND, lpRect: Option<&RECT>) -> bool { - // Just ignore. +pub fn ValidateRect(machine: &mut Machine, hWnd: HWND, lpRect: Option<&RECT>) -> bool { + let window = machine.state.user32.windows.get_mut(hWnd).unwrap(); + match lpRect { + Some(_rect) => { + // TODO: ignored. + } + None => window.dirty = None, + } false // fail }