reactos/subsys/win32k/misc
diff -u -r1.12.8.3 -r1.12.8.4
--- object.c 14 Sep 2004 01:00:43 -0000 1.12.8.3
+++ object.c 26 Sep 2004 22:44:35 -0000 1.12.8.4
@@ -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: object.c,v 1.12.8.3 2004/09/14 01:00:43 weiden Exp $
+/* $Id: object.c,v 1.12.8.4 2004/09/26 22:44:35 weiden Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -147,7 +147,7 @@
LastSlot = HandleTable->Handles + N_USER_HANDLES;
for(Slot = HandleTable->Handles; Slot < LastSlot; Slot++)
{
- if(InterlockedCompareExchange((LONG*)Slot, (LONG)ObjectHeader, 0) == 0)
+ if(InterlockedCompareExchangePointer(Slot, ObjectHeader, NULL) == NULL)
{
/* found and assigned a free handle */
InterlockedIncrement((LONG*)&HandleTable->HandleCount);
@@ -204,7 +204,7 @@
}
/* remove the object from the handle table */
- InterlockedCompareExchange((LONG*)ObjectHeader->Slot, 0, (LONG)ObjectHeader);
+ InterlockedCompareExchangePointer(ObjectHeader->Slot, NULL, ObjectHeader);
InterlockedDecrement((LONG*)&HandleTable->HandleCount);
ObjectHeader->Slot = NULL;
reactos/subsys/win32k/ntuser
diff -u -r1.59.8.5 -r1.59.8.6
--- class.c 26 Sep 2004 22:28:49 -0000 1.59.8.5
+++ class.c 26 Sep 2004 22:44:35 -0000 1.59.8.6
@@ -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.5 2004/09/26 22:28:49 weiden Exp $
+/* $Id: class.c,v 1.59.8.6 2004/09/26 22:44:35 weiden Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -101,12 +101,13 @@
(LPWSTR)ClassName->Buffer,
&ClassAtom);
- if (NT_SUCCESS(Status))
+ if (!NT_SUCCESS(Status))
{
- return IntReferenceClassByAtom(Class, ClassAtom, hInstance);
+ DbgPrint("RtlLookupAtomInAtomTable failed for %wZ\n", ClassName);
+ return FALSE;
}
- return FALSE;
+ return IntReferenceClassByAtom(Class, ClassAtom, hInstance);
}
BOOL INTERNAL_CALL
@@ -162,6 +163,7 @@
&Length);
if(!NT_SUCCESS(Status))
{
+ DPRINT1("IntGetClassName: RtlQueryAtomInAtomTable failed\n");
RtlFreeUnicodeString(ClassName);
return FALSE;
}
@@ -302,28 +304,23 @@
}
/* FIXME - check the rights of the thread's desktop if we're allowed to register a class? */
-
- if(ClassName->Length > 0)
+
+ DPRINT("IntRegisterClass(%wZ)\n", ClassName);
+ Status = RtlAddAtomToAtomTable(WinStaObject->AtomTable,
+ ClassName->Buffer,
+ &Atom);
+ if (!NT_SUCCESS(Status))
{
- DPRINT("IntRegisterClass(%wZ)\n", ClassName);
- Status = RtlAddAtomToAtomTable(WinStaObject->AtomTable,
- ClassName->Buffer,
- &Atom);
- if (!NT_SUCCESS(Status))
- {
- DPRINT1("Failed adding class name (%wZ) to atom table\n", ClassName);
- SetLastNtError(Status);
- return NULL;
- }
+ DPRINT1("Failed adding class name (%wZ) to atom table\n", ClassName);
+ SetLastNtError(Status);
+ return NULL;
}
-
+
Ret = IntCreateClass(lpwcx, Flags, wpExtra, MenuName, Atom);
if(Ret == NULL)
{
- if(ClassName->Length > 0)
- {
- RtlDeleteAtomFromAtomTable(WinStaObject->AtomTable, Atom);
- }
+ DPRINT1("Failed creating a class object (%wZ)\n", ClassName);
+ RtlDeleteAtomFromAtomTable(WinStaObject->AtomTable, Atom);
return NULL;
}
reactos/subsys/win32k/ntuser
diff -u -r1.29.12.3 -r1.29.12.4
--- vis.c 14 Sep 2004 01:00:44 -0000 1.29.12.3
+++ vis.c 26 Sep 2004 22:44:35 -0000 1.29.12.4
@@ -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: vis.c,v 1.29.12.3 2004/09/14 01:00:44 weiden Exp $
+ * $Id: vis.c,v 1.29.12.4 2004/09/26 22:44:35 weiden Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -77,7 +77,8 @@
* our window.
*/
- while ((CurrentWindow = IntGetParentObject(Window)))
+ PreviousWindow = Window;
+ while ((CurrentWindow = IntGetParentObject(PreviousWindow)))
{
if (!(CurrentWindow->Style & WS_VISIBLE))
{
@@ -89,7 +90,7 @@
NtGdiDeleteObject(ClipRgn);
if ((PreviousWindow->Style & WS_CLIPSIBLINGS) ||
- (PreviousWindow == Window && ClipSiblings))
+ (PreviousWindow == PreviousWindow && ClipSiblings))
{
CurrentSibling = CurrentWindow->FirstChild;
while (CurrentSibling != NULL && CurrentSibling != PreviousWindow)
@@ -111,7 +112,7 @@
}
}
- Window = CurrentWindow;
+ PreviousWindow = CurrentWindow;
}
if (ClipChildren)