3 modified files
reactos/subsys/win32k/ntuser
diff -u -r1.59.8.4 -r1.59.8.5
--- class.c 14 Sep 2004 01:00:44 -0000 1.59.8.4
+++ class.c 26 Sep 2004 22:28:49 -0000 1.59.8.5
@@ -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: class.c,v 1.59.8.4 2004/09/14 01:00:44 weiden Exp $
+/* $Id: class.c,v 1.59.8.5 2004/09/26 22:28:49 weiden Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -101,12 +101,12 @@
(LPWSTR)ClassName->Buffer,
&ClassAtom);
- if (!NT_SUCCESS(Status))
+ if (NT_SUCCESS(Status))
{
- return FALSE;
+ return IntReferenceClassByAtom(Class, ClassAtom, hInstance);
}
- return IntReferenceClassByAtom(Class, ClassAtom, hInstance);
+ return FALSE;
}
BOOL INTERNAL_CALL
@@ -162,7 +162,6 @@
&Length);
if(!NT_SUCCESS(Status))
{
- DPRINT1("IntGetClassName: RtlQueryAtomInAtomTable failed\n");
RtlFreeUnicodeString(ClassName);
return FALSE;
}
@@ -313,14 +312,10 @@
if (!NT_SUCCESS(Status))
{
DPRINT1("Failed adding class name (%wZ) to atom table\n", ClassName);
- SetLastNtError(Status);
+ SetLastNtError(Status);
return NULL;
}
}
- else
- {
- Atom = (RTL_ATOM)(ULONG)ClassName->Buffer;
- }
Ret = IntCreateClass(lpwcx, Flags, wpExtra, MenuName, Atom);
if(Ret == NULL)
reactos/subsys/win32k/ntuser
diff -u -r1.1.4.12 -r1.1.4.13
--- ntuser.c 25 Sep 2004 01:11:07 -0000 1.1.4.12
+++ ntuser.c 26 Sep 2004 22:28:49 -0000 1.1.4.13
@@ -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: ntuser.c,v 1.1.4.12 2004/09/25 01:11:07 weiden Exp $
+/* $Id: ntuser.c,v 1.1.4.13 2004/09/26 22:28:49 weiden Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -1809,7 +1809,7 @@
/* copy the class name string */
if(!IS_ATOM(SafeClassName.Buffer))
{
- NtStatus = IntSafeCopyUnicodeString(&SafeClassName, ClassName);
+ NtStatus = IntSafeCopyUnicodeStringTerminateNULL(&SafeClassName, ClassName);
if(!NT_SUCCESS(NtStatus))
{
NTUSER_FAIL_NTERROR(NtStatus);
@@ -1819,7 +1819,7 @@
/* copy the menu name string */
if(!IS_ATOM(SafeMenuName.Buffer))
{
- NtStatus = IntSafeCopyUnicodeString(&SafeMenuName, MenuName);
+ NtStatus = IntSafeCopyUnicodeStringTerminateNULL(&SafeMenuName, MenuName);
if(!NT_SUCCESS(NtStatus))
{
if(!IS_ATOM(SafeClassName.Buffer))
reactos/subsys/win32k/ntuser
diff -u -r1.120.2.4 -r1.120.2.5
--- winpos.c 14 Sep 2004 01:00:44 -0000 1.120.2.4
+++ winpos.c 26 Sep 2004 22:28:49 -0000 1.120.2.5
@@ -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: winpos.c,v 1.120.2.4 2004/09/14 01:00:44 weiden Exp $
+/* $Id: winpos.c,v 1.120.2.5 2004/09/26 22:28:49 weiden Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -548,7 +548,7 @@
WinPosDoOwnedPopups(PWINDOW_OBJECT Window, PWINDOW_OBJECT InsertAfter)
{
LONG Style;
- PWINDOW_OBJECT DesktopWindow, Current;
+ PWINDOW_OBJECT DesktopWindow = NULL, Current;
BOOL Searched = FALSE;
ASSERT(Window);
@@ -563,30 +563,33 @@
if (InsertAfter != WINDOW_TOPMOST)
{
DesktopWindow = IntGetDesktopWindow();
-
- for(Current = DesktopWindow->FirstChild; Current != NULL;
- Current = Current->NextSibling)
+
+ if(DesktopWindow != NULL)
{
- Searched = TRUE;
-
- if(Current == Window->Owner)
- {
- break;
- }
- if(WINDOW_TOP == InsertAfter)
+ for(Current = DesktopWindow->FirstChild; Current != NULL;
+ Current = Current->NextSibling)
{
- if (0 == (Current->ExStyle & WS_EX_TOPMOST))
+ Searched = TRUE;
+
+ if(Current == Window->Owner)
+ {
+ break;
+ }
+ if(WINDOW_TOP == InsertAfter)
+ {
+ if (0 == (Current->ExStyle & WS_EX_TOPMOST))
+ {
+ break;
+ }
+ }
+ if(Current != Window)
+ {
+ LocalPrev = Current;
+ }
+ if(LocalPrev == InsertAfter)
{
break;
}
- }
- if(Current != Window)
- {
- LocalPrev = Current;
- }
- if(LocalPrev == InsertAfter)
- {
- break;
}
}
}
@@ -598,19 +601,25 @@
if (!Searched)
{
- for(Current = DesktopWindow->FirstChild; Current != NULL;
- Current = Current->NextSibling)
+ if(DesktopWindow == NULL)
+ DesktopWindow = IntGetDesktopWindow();
+
+ if(DesktopWindow != NULL)
{
- if(Current == Window)
- {
- break;
- }
-
- if(Current->Style & WS_POPUP && Current->Owner == Window)
+ for(Current = DesktopWindow->FirstChild; Current != NULL;
+ Current = Current->NextSibling)
{
- WinPosSetWindowPos(Current, InsertAfter, 0, 0, 0, 0,
- SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE | SWP_NOSENDCHANGING);
- InsertAfter = Current;
+ if(Current == Window)
+ {
+ break;
+ }
+
+ if(Current->Style & WS_POPUP && Current->Owner == Window)
+ {
+ WinPosSetWindowPos(Current, InsertAfter, 0, 0, 0, 0,
+ SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE | SWP_NOSENDCHANGING);
+ InsertAfter = Current;
+ }
}
}
}
CVSspam 0.2.8