- Move desktop code from NtUserUpdatePerUserSystemParameters to IntDesktopUpdatePerUs...
authorFilip Navara <filip.navara@gmail.com>
Fri, 10 Dec 2004 16:52:04 +0000 (16:52 +0000)
committerFilip Navara <filip.navara@gmail.com>
Fri, 10 Dec 2004 16:52:04 +0000 (16:52 +0000)
svn path=/trunk/; revision=12000

reactos/subsys/win32k/include/desktop.h
reactos/subsys/win32k/ntuser/desktop.c
reactos/subsys/win32k/ntuser/misc.c

index a153377..58949bf 100644 (file)
@@ -66,6 +66,9 @@ IntParseDesktopPath(PEPROCESS Process,
                     HWINSTA *hWinSta,
                     HDESK *hDesktop);
 
+BOOL FASTCALL
+IntDesktopUpdatePerUserSettings(BOOL bEnable);
+
 #define IntIsActiveDesktop(Desktop) \
   ((Desktop)->WindowStation->ActiveDesktop == (Desktop))
 
index 11a8194..3430d0a 100644 (file)
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *  $Id: desktop.c,v 1.26 2004/12/06 02:23:05 navaraf Exp $
+ *  $Id: desktop.c,v 1.27 2004/12/10 16:52:04 navaraf Exp $
  *
  *  COPYRIGHT:        See COPYING in the top level directory
  *  PROJECT:          ReactOS kernel
@@ -408,6 +408,42 @@ HWND FASTCALL IntGetCurrentThreadDesktopWindow(VOID)
   return pdo->DesktopWindow;
 }
 
+BOOL FASTCALL IntDesktopUpdatePerUserSettings(BOOL bEnable)
+{
+   if (bEnable)
+   {
+      RTL_QUERY_REGISTRY_TABLE QueryTable[2];
+      NTSTATUS Status;
+
+      RtlZeroMemory(QueryTable, sizeof(QueryTable));
+
+      QueryTable[0].Flags = RTL_QUERY_REGISTRY_DIRECT;
+      QueryTable[0].Name = L"PaintDesktopVersion";
+      QueryTable[0].EntryContext = &g_PaintDesktopVersion;
+
+      /* Query the "PaintDesktopVersion" flag in the "Control Panel\Desktop" key */
+      Status = RtlQueryRegistryValues(RTL_REGISTRY_USER, 
+                                      L"Control Panel\\Desktop",
+                                      QueryTable, NULL, NULL);
+      if (!NT_SUCCESS(Status))
+      {
+         DPRINT1("RtlQueryRegistryValues failed for PaintDesktopVersion (%x)\n",
+                 Status);
+         g_PaintDesktopVersion = FALSE;
+         return FALSE;
+      }
+    
+      DPRINT("PaintDesktopVersion = %d\n", g_PaintDesktopVersion);
+
+      return TRUE;
+   }
+   else
+   {
+      g_PaintDesktopVersion = FALSE;
+      return TRUE;
+   }
+}
+
 /* PUBLIC FUNCTIONS ***********************************************************/
 
 NTSTATUS FASTCALL
index 3fa9797..8f67dd0 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: misc.c,v 1.89 2004/12/06 02:23:05 navaraf Exp $
+/* $Id: misc.c,v 1.90 2004/12/10 16:52:04 navaraf Exp $
  *
  * COPYRIGHT:        See COPYING in the top level directory
  * PROJECT:          ReactOS kernel
@@ -1330,44 +1330,14 @@ IntFreeNULLTerminatedFromUnicodeString(PWSTR NullTerminated, PUNICODE_STRING Uni
     }
 }
 
-
 BOOL STDCALL
 NtUserUpdatePerUserSystemParameters(
-   DWORD dwUnknown,
+   DWORD dwReserved,
    BOOL bEnable)
 {
-   if (bEnable)
-   {
-      RTL_QUERY_REGISTRY_TABLE QueryTable[2];
-      NTSTATUS Status;
-
-      RtlZeroMemory(QueryTable, sizeof(QueryTable));
-
-      QueryTable[0].Flags = RTL_QUERY_REGISTRY_DIRECT;
-      QueryTable[0].Name = L"PaintDesktopVersion";
-      QueryTable[0].EntryContext = &g_PaintDesktopVersion;
-
-      /* Query the "PaintDesktopVersion" flag in the "Control Panel\Desktop" key */
-      Status = RtlQueryRegistryValues(RTL_REGISTRY_USER, 
-                                      L"Control Panel\\Desktop",
-                                      QueryTable, NULL, NULL);
-      if (!NT_SUCCESS(Status))
-      {
-         DPRINT1("RtlQueryRegistryValues failed for PaintDesktopVersion (%x)\n",
-                 Status);
-         g_PaintDesktopVersion = FALSE;
-         return FALSE;
-      }
-    
-      DPRINT1("PaintDesktopVersion = %d\n", g_PaintDesktopVersion);
-
-      return TRUE;
-   }
-   else
-   {
-      g_PaintDesktopVersion = FALSE;
-      return TRUE;
-   }
+   BOOL Result = TRUE;
+   Result &= IntDesktopUpdatePerUserSettings(bEnable);
+   return Result;
 }
 
 /* EOF */