- Move desktop code from NtUserUpdatePerUserSystemParameters to IntDesktopUpdatePerUserSettings.

svn path=/trunk/; revision=12000
This commit is contained in:
Filip Navara 2004-12-10 16:52:04 +00:00
parent c5adfe4512
commit 7cde3a39e7
3 changed files with 45 additions and 36 deletions

View file

@ -66,6 +66,9 @@ IntParseDesktopPath(PEPROCESS Process,
HWINSTA *hWinSta,
HDESK *hDesktop);
BOOL FASTCALL
IntDesktopUpdatePerUserSettings(BOOL bEnable);
#define IntIsActiveDesktop(Desktop) \
((Desktop)->WindowStation->ActiveDesktop == (Desktop))

View 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

View 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 */