mirror of
https://github.com/reactos/reactos.git
synced 2025-04-27 17:10:22 +00:00
[Win32k]
- Class.c: Restore module address from cloned class if it is a default user class. See bug 4778 - Remove unneeded debug prints. - Tested: wine user32 class test, AbiWord 2.6.8, FF 3.5 and OOo 2.4.3. svn path=/trunk/; revision=44561
This commit is contained in:
parent
3efe83afa3
commit
bc65426abe
1 changed files with 16 additions and 8 deletions
|
@ -508,11 +508,19 @@ IntGetClassForDesktop(IN OUT PCLS BaseClass,
|
||||||
if (Class != NULL)
|
if (Class != NULL)
|
||||||
{
|
{
|
||||||
/* simply clone the class */
|
/* simply clone the class */
|
||||||
RtlCopyMemory(Class,
|
RtlCopyMemory( Class, BaseClass, ClassSize);
|
||||||
BaseClass,
|
|
||||||
ClassSize);
|
|
||||||
DPRINT("Clone Class 0x%x hM 0x%x\n %S\n",Class, Class->hModule, Class->lpszClientUnicodeMenuName);
|
DPRINT("Clone Class 0x%x hM 0x%x\n %S\n",Class, Class->hModule, Class->lpszClientUnicodeMenuName);
|
||||||
|
|
||||||
|
/* restore module address if default user class Ref: Bug 4778 */
|
||||||
|
if ( Class->hModule != hModClient &&
|
||||||
|
Class->fnid <= FNID_GHOST &&
|
||||||
|
Class->fnid >= FNID_BUTTON )
|
||||||
|
{
|
||||||
|
Class->hModule = hModClient;
|
||||||
|
DPRINT("Clone Class 0x%x Reset hM 0x%x\n",Class, Class->hModule);
|
||||||
|
}
|
||||||
|
|
||||||
/* update some pointers and link the class */
|
/* update some pointers and link the class */
|
||||||
Class->rpdeskParent = Desktop;
|
Class->rpdeskParent = Desktop;
|
||||||
Class->cWndReferenceCount = 0;
|
Class->cWndReferenceCount = 0;
|
||||||
|
@ -1231,7 +1239,7 @@ UserRegisterClass(IN CONST WNDCLASSEXW* lpwcx,
|
||||||
if (Class != NULL && !Class->Global)
|
if (Class != NULL && !Class->Global)
|
||||||
{
|
{
|
||||||
// local class already exists
|
// local class already exists
|
||||||
DPRINT1("Local Class 0x%p does already exist!\n", ClassAtom);
|
DPRINT("Local Class 0x%p does already exist!\n", ClassAtom);
|
||||||
SetLastWin32Error(ERROR_CLASS_ALREADY_EXISTS);
|
SetLastWin32Error(ERROR_CLASS_ALREADY_EXISTS);
|
||||||
return (RTL_ATOM)0;
|
return (RTL_ATOM)0;
|
||||||
}
|
}
|
||||||
|
@ -1245,7 +1253,7 @@ UserRegisterClass(IN CONST WNDCLASSEXW* lpwcx,
|
||||||
|
|
||||||
if (Class != NULL && Class->Global)
|
if (Class != NULL && Class->Global)
|
||||||
{
|
{
|
||||||
DPRINT1("Global Class 0x%p does already exist!\n", ClassAtom);
|
DPRINT("Global Class 0x%p does already exist!\n", ClassAtom);
|
||||||
SetLastWin32Error(ERROR_CLASS_ALREADY_EXISTS);
|
SetLastWin32Error(ERROR_CLASS_ALREADY_EXISTS);
|
||||||
return (RTL_ATOM)0;
|
return (RTL_ATOM)0;
|
||||||
}
|
}
|
||||||
|
@ -1306,7 +1314,7 @@ UserUnregisterClass(IN PUNICODE_STRING ClassName,
|
||||||
&Link);
|
&Link);
|
||||||
if (ClassAtom == (RTL_ATOM)0)
|
if (ClassAtom == (RTL_ATOM)0)
|
||||||
{
|
{
|
||||||
DPRINT1("UserUnregisterClass: No Class found.\n");
|
DPRINT("UserUnregisterClass: No Class found.\n");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2120,12 +2128,12 @@ InvalidParameter:
|
||||||
SetLastNtError(_SEH2_GetExceptionCode());
|
SetLastNtError(_SEH2_GetExceptionCode());
|
||||||
}
|
}
|
||||||
_SEH2_END;
|
_SEH2_END;
|
||||||
|
/*
|
||||||
if (!Ret)
|
if (!Ret)
|
||||||
{
|
{
|
||||||
DPRINT1("NtUserRegisterClassExWOW Null Return!\n");
|
DPRINT1("NtUserRegisterClassExWOW Null Return!\n");
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
UserLeave();
|
UserLeave();
|
||||||
|
|
||||||
return Ret;
|
return Ret;
|
||||||
|
|
Loading…
Reference in a new issue