[ros-diffs] [fireball] 42160: - Commit an evil hack which sets desktop's window to 800x600 in win32csr and redraws it to make it visible. This brings us the so missed desktop background and is going to aid in debugging further problems.

fireball at svn.reactos.org fireball at svn.reactos.org
Thu Jul 23 21:27:06 CEST 2009


Author: fireball
Date: Thu Jul 23 21:27:06 2009
New Revision: 42160

URL: http://svn.reactos.org/svn/reactos?rev=42160&view=rev
Log:
- Commit an evil hack which sets desktop's window to 800x600 in win32csr and redraws it to make it visible. This brings us the so missed desktop background and is going to aid in debugging further problems.

Modified:
    branches/arwinss/reactos/subsystems/win32/csrss/win32csr/desktopbg.c

Modified: branches/arwinss/reactos/subsystems/win32/csrss/win32csr/desktopbg.c
URL: http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win32/csrss/win32csr/desktopbg.c?rev=42160&r1=42159&r2=42160&view=diff
==============================================================================
--- branches/arwinss/reactos/subsystems/win32/csrss/win32csr/desktopbg.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/subsystems/win32/csrss/win32csr/desktopbg.c [iso-8859-1] Thu Jul 23 21:27:06 2009
@@ -150,10 +150,11 @@
   return TRUE;
 }
 
+HWND BackgroundWnd;
+
 static DWORD WINAPI
 DtbgDesktopThread(PVOID Data)
 {
-  HWND BackgroundWnd;
   MSG msg;
   PDTBG_THREAD_DATA ThreadData = (PDTBG_THREAD_DATA) Data;
 
@@ -245,6 +246,26 @@
   WaitForSingleObject(ThreadData.Event, INFINITE);
   CloseHandle(ThreadData.Event);
 
+  /* Show the desktop immediately */
+  {
+  PRIVATE_NOTIFY_DESKTOP nmh;
+
+  nmh.hdr.hwndFrom = BackgroundWnd;
+  nmh.hdr.idFrom = 0;
+  nmh.hdr.code = PM_SHOW_DESKTOP;
+
+  nmh.ShowDesktop.Width = 800;
+  nmh.ShowDesktop.Height = 600;
+
+  SendMessageW(BackgroundWnd,
+                      WM_NOTIFY,
+                      (WPARAM)nmh.hdr.hwndFrom,
+                      (LPARAM)&nmh)
+         ? STATUS_UNSUCCESSFUL : STATUS_SUCCESS;
+
+  RedrawWindow(BackgroundWnd, NULL, 0, RDW_INVALIDATE | RDW_FRAME | RDW_ERASENOW | RDW_ALLCHILDREN);
+  }
+
   return ThreadData.Status;
 }
 




More information about the Ros-diffs mailing list