From: Aleksey Bragin Date: Tue, 3 Nov 2009 19:03:11 +0000 (+0000) Subject: [csrss] X-Git-Tag: ReactOS-0.3.11~169 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=006d77b16be2361df3d525698d3ffa33a69e6dd7;hp=e788e7f0841fc6c6057c24a567368c65c5f5567e [csrss] - Paint the desktop only when getting WM_ERASEBKGND message, and do nothing in WM_PAINT. This is the behavior Windows and Wine implement. - Add WM_CLOSE stub-handler, though it doesn't change much now - all messages unhandled by the switch are going to return "0" since this proc doesn't call DefWndProcHandler. svn path=/trunk/; revision=43934 --- diff --git a/reactos/subsystems/win32/csrss/win32csr/desktopbg.c b/reactos/subsystems/win32/csrss/win32csr/desktopbg.c index ed17c226b6c..ea6b0ca2283 100644 --- a/reactos/subsystems/win32/csrss/win32csr/desktopbg.c +++ b/reactos/subsystems/win32/csrss/win32csr/desktopbg.c @@ -42,23 +42,19 @@ static HWND VisibleDesktopWindow = NULL; static LRESULT CALLBACK DtbgWindowProc(HWND Wnd, UINT Msg, WPARAM wParam, LPARAM lParam) { - switch(Msg) + PAINTSTRUCT PS; + HDC hDC; + + switch(Msg) { case WM_ERASEBKGND: + PaintDesktop((HDC)wParam); return 1; case WM_PAINT: { - PAINTSTRUCT PS; - RECT rc; - HDC hDC; - - if(GetUpdateRect(Wnd, &rc, FALSE) && - (hDC = BeginPaint(Wnd, &PS))) - { - PaintDesktop(hDC); + if((hDC = BeginPaint(Wnd, &PS))) EndPaint(Wnd, &PS); - } return 0; } @@ -71,6 +67,9 @@ DtbgWindowProc(HWND Wnd, UINT Msg, WPARAM wParam, LPARAM lParam) case WM_CREATE: return 0; + case WM_CLOSE: + return 0; + case WM_NOTIFY: { PPRIVATE_NOTIFY_DESKTOP nmh = (PPRIVATE_NOTIFY_DESKTOP)lParam;