mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 16:32:59 +00:00
- Move desktop code from NtUserUpdatePerUserSystemParameters to IntDesktopUpdatePerUserSettings.
svn path=/trunk/; revision=12000
This commit is contained in:
parent
c5adfe4512
commit
7cde3a39e7
3 changed files with 45 additions and 36 deletions
|
@ -66,6 +66,9 @@ IntParseDesktopPath(PEPROCESS Process,
|
||||||
HWINSTA *hWinSta,
|
HWINSTA *hWinSta,
|
||||||
HDESK *hDesktop);
|
HDESK *hDesktop);
|
||||||
|
|
||||||
|
BOOL FASTCALL
|
||||||
|
IntDesktopUpdatePerUserSettings(BOOL bEnable);
|
||||||
|
|
||||||
#define IntIsActiveDesktop(Desktop) \
|
#define IntIsActiveDesktop(Desktop) \
|
||||||
((Desktop)->WindowStation->ActiveDesktop == (Desktop))
|
((Desktop)->WindowStation->ActiveDesktop == (Desktop))
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* 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
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -408,6 +408,42 @@ HWND FASTCALL IntGetCurrentThreadDesktopWindow(VOID)
|
||||||
return pdo->DesktopWindow;
|
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 ***********************************************************/
|
/* PUBLIC FUNCTIONS ***********************************************************/
|
||||||
|
|
||||||
NTSTATUS FASTCALL
|
NTSTATUS FASTCALL
|
||||||
|
|
|
@ -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
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -1330,44 +1330,14 @@ IntFreeNULLTerminatedFromUnicodeString(PWSTR NullTerminated, PUNICODE_STRING Uni
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
BOOL STDCALL
|
BOOL STDCALL
|
||||||
NtUserUpdatePerUserSystemParameters(
|
NtUserUpdatePerUserSystemParameters(
|
||||||
DWORD dwUnknown,
|
DWORD dwReserved,
|
||||||
BOOL bEnable)
|
BOOL bEnable)
|
||||||
{
|
{
|
||||||
if (bEnable)
|
BOOL Result = TRUE;
|
||||||
{
|
Result &= IntDesktopUpdatePerUserSettings(bEnable);
|
||||||
RTL_QUERY_REGISTRY_TABLE QueryTable[2];
|
return Result;
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* EOF */
|
/* EOF */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue