[ros-diffs] [fireball] 43934: [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.

fireball at svn.reactos.org fireball at svn.reactos.org
Tue Nov 3 20:03:12 CET 2009


Author: fireball
Date: Tue Nov  3 20:03:11 2009
New Revision: 43934

URL: http://svn.reactos.org/svn/reactos?rev=43934&view=rev
Log:
[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.

Modified:
    trunk/reactos/subsystems/win32/csrss/win32csr/desktopbg.c

Modified: trunk/reactos/subsystems/win32/csrss/win32csr/desktopbg.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/win32csr/desktopbg.c?rev=43934&r1=43933&r2=43934&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/csrss/win32csr/desktopbg.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/csrss/win32csr/desktopbg.c [iso-8859-1] Tue Nov  3 20:03:11 2009
@@ -42,23 +42,19 @@
 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;
       }
 
@@ -69,6 +65,9 @@
         return (LRESULT) TRUE;
 
       case WM_CREATE:
+        return 0;
+
+      case WM_CLOSE:
         return 0;
 
       case WM_NOTIFY:




More information about the Ros-diffs mailing list