From d63e0ea3fc8e62aadd4441cd013f912ef4de2ed6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Sun, 12 Jun 2016 16:48:25 +0000 Subject: [PATCH] [ROSTEST:PAINTDESKTOP]: Improve the test: don't force complete redraw when resizing the window, and return a non-zero value from WM_ERASEBKGD if the PaintDesktop call succeeded. svn path=/trunk/; revision=71623 --- rostests/win32/user32/paintdesktop/PaintDesktop.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/rostests/win32/user32/paintdesktop/PaintDesktop.c b/rostests/win32/user32/paintdesktop/PaintDesktop.c index c14825cca3b..014c89df284 100644 --- a/rostests/win32/user32/paintdesktop/PaintDesktop.c +++ b/rostests/win32/user32/paintdesktop/PaintDesktop.c @@ -46,7 +46,7 @@ ATOM MyRegisterClass(HINSTANCE hInstance) { WNDCLASS wc; - wc.style = CS_HREDRAW | CS_VREDRAW; + wc.style = 0; wc.lpfnWndProc = WndProc; wc.cbClsExtra = 0; wc.cbWndExtra = 0; @@ -87,8 +87,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) break; case WM_ERASEBKGND: - PaintDesktop((HDC)wParam); - break; + return (LRESULT)PaintDesktop((HDC)wParam); case WM_DESTROY: PostQuitMessage(0);