- Fix control list of atoms.
- Add DDE atom.

svn path=/trunk/; revision=65990
This commit is contained in:
James Tabor 2015-01-05 22:32:16 +00:00
parent 0c9a650aa9
commit 7de914f84e
2 changed files with 51 additions and 2 deletions

View file

@ -9,6 +9,27 @@
#include <win32k.h>
DBG_DEFAULT_CHANNEL(UserClass);
static PWSTR ControlsList[] =
{
L"Button",
L"Edit",
L"Static",
L"ListBox",
L"ScrollBar",
L"ComboBox",
L"MDIClient",
L"ComboLBox",
L"DDEMLEvent",
L"DDEMLMom",
L"DMGClass",
L"DDEMLAnsiClient",
L"DDEMLUnicodeClient",
L"DDEMLAnsiServer",
L"DDEMLUnicodeServer",
L"IME",
L"Ghost",
};
static NTSTATUS IntDeregisterClassAtom(IN RTL_ATOM Atom);
REGISTER_SYSCLASS DefaultServerClasses[] =
@ -350,6 +371,26 @@ IntRegisterClassAtom(IN PUNICODE_STRING ClassName,
return TRUE;
}
BOOL FASTCALL
RegisterControlAtoms(VOID)
{
RTL_ATOM Atom;
UNICODE_STRING ClassName;
INT i = 0;
while ( i < ICLS_DESKTOP)
{
RtlInitUnicodeString(&ClassName, ControlsList[i]);
if (IntRegisterClassAtom(&ClassName, &Atom))
{
gpsi->atomSysClass[i] = Atom;
ERR("Reg Control Atoms 0x%x\n",Atom);
}
i++;
}
return TRUE;
}
static NTSTATUS
IntDeregisterClassAtom(IN RTL_ATOM Atom)
{
@ -1026,7 +1067,7 @@ IntCreateClass(IN CONST WNDCLASSEXW* lpwcx,
Class->fnid = fnID;
Class->CSF_flags = dwFlags;
if (LookupFnIdToiCls(Class->fnid, &iCls))
if (LookupFnIdToiCls(Class->fnid, &iCls) && gpsi->atomSysClass[iCls] == 0)
{
gpsi->atomSysClass[iCls] = Class->atomClassName;
}

View file

@ -8,6 +8,8 @@
#include <win32k.h>
DBG_DEFAULT_CHANNEL(UserMisc);
BOOL FASTCALL RegisterControlAtoms(VOID);
/* GLOBALS ********************************************************************/
PTHREADINFO gptiCurrent = NULL;
@ -17,6 +19,7 @@ ATOM AtomMessage; // Window Message atom.
ATOM AtomWndObj; // Window Object atom.
ATOM AtomLayer; // Window Layer atom.
ATOM AtomFlashWndState; // Window Flash State atom.
ATOM AtomDDETrack; // Window DDE Tracking atom.
HINSTANCE hModClient = NULL;
BOOL ClientPfnInit = FALSE;
ATOM gaGuiConsoleWndClass;
@ -27,6 +30,8 @@ static
NTSTATUS FASTCALL
InitUserAtoms(VOID)
{
RegisterControlAtoms();
gpsi->atomSysClass[ICLS_MENU] = 32768;
gpsi->atomSysClass[ICLS_DESKTOP] = 32769;
gpsi->atomSysClass[ICLS_DIALOG] = 32770;
@ -46,12 +51,15 @@ InitUserAtoms(VOID)
gpsi->atomFrostedWindowProp = IntAddGlobalAtom(L"SysFrostedWindow", TRUE);
AtomDDETrack = IntAddGlobalAtom(L"SysDT", TRUE);
/*
* FIXME: AddPropW uses the global kernel atom table, thus leading to conflicts if we use
* the win32k atom table for this ones. What is the right thing to do ?
* the win32k atom table for this one. What is the right thing to do ?
*/
// AtomWndObj = IntAddGlobalAtom(L"SysWNDO", TRUE);
NtAddAtom(L"SysWNDO", 14, &AtomWndObj);
AtomLayer = IntAddGlobalAtom(L"SysLayer", TRUE);
AtomFlashWndState = IntAddGlobalAtom(L"FlashWState", TRUE);