9 modified files
reactos/subsys/win32k/eng
diff -u -r1.44.4.1 -r1.44.4.2
--- surface.c 12 Sep 2004 19:21:06 -0000 1.44.4.1
+++ surface.c 13 Sep 2004 21:28:16 -0000 1.44.4.2
@@ -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: surface.c,v 1.44.4.1 2004/09/12 19:21:06 weiden Exp $
+/* $Id: surface.c,v 1.44.4.2 2004/09/13 21:28:16 weiden Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -90,10 +90,13 @@
SURFOBJ *SurfObj;
NewBitmap = EngCreateBitmap(Size, DIB_GetDIBWidthBytes(Size.cx, BitsPerFormat(Format)), Format, 0, NULL);
- SurfObj = EngLockSurface((HSURF)NewBitmap);
- SurfObj->dhsurf = dhsurf;
- EngUnlockSurface(SurfObj);
-
+ if(NewBitmap != NULL &&
+ (SurfObj = EngLockSurface((HSURF)NewBitmap)))
+ {
+ SurfObj->dhsurf = dhsurf;
+ EngUnlockSurface(SurfObj);
+ }
+
return NewBitmap;
}
@@ -356,20 +359,23 @@
GDIOBJ_SetOwnership(NewSurface, NULL);
BitmapObj = BITMAPOBJ_LockBitmap(NewSurface);
- SurfObj = &BitmapObj->SurfObj;
-
- SurfObj->dhsurf = dhsurf;
- SurfObj->hsurf = NewSurface;
- SurfObj->sizlBitmap = Size;
- SurfObj->iBitmapFormat = Format;
- SurfObj->lDelta = DIB_GetDIBWidthBytes(Size.cx, BitsPerFormat(Format));
- SurfObj->iType = STYPE_DEVICE;
- SurfObj->iUniq = 0;
+ if(BitmapObj != NULL)
+ {
+ SurfObj = &BitmapObj->SurfObj;
- BitmapObj->flHooks = 0;
+ SurfObj->dhsurf = dhsurf;
+ SurfObj->hsurf = NewSurface;
+ SurfObj->sizlBitmap = Size;
+ SurfObj->iBitmapFormat = Format;
+ SurfObj->lDelta = DIB_GetDIBWidthBytes(Size.cx, BitsPerFormat(Format));
+ SurfObj->iType = STYPE_DEVICE;
+ SurfObj->iUniq = 0;
- BITMAPOBJ_UnlockBitmap(BitmapObj);
+ BitmapObj->flHooks = 0;
+ BITMAPOBJ_UnlockBitmap(BitmapObj);
+ }
+
return NewSurface;
}
@@ -400,18 +406,20 @@
Device = (GDIDEVICE*)Dev;
BitmapObj = BITMAPOBJ_LockBitmap(Surface);
- ASSERT(BitmapObj);
- SurfObj = &BitmapObj->SurfObj;
-
- /* Associate the hdev */
- SurfObj->hdev = Dev;
- SurfObj->dhpdev = Device->PDev;
+ if(BitmapObj != NULL)
+ {
+ SurfObj = &BitmapObj->SurfObj;
- /* Hook up specified functions */
- BitmapObj->flHooks = Hooks;
+ /* Associate the hdev */
+ SurfObj->hdev = Dev;
+ SurfObj->dhpdev = Device->PDev;
- BITMAPOBJ_UnlockBitmap(BitmapObj);
+ /* Hook up specified functions */
+ BitmapObj->flHooks = Hooks;
+ BITMAPOBJ_UnlockBitmap(BitmapObj);
+ }
+
return TRUE;
}
@@ -493,7 +501,7 @@
/* FIXME - Determine the address of the PBITMAPOBJ structure, this is just a hack
as we know that the PSURFOBJ is the first field so we can just typecast it.
But it might change some day, so please fix this! */
-
+ ASSERT(Surface);
BITMAPOBJ_UnlockBitmap ( (BITMAPOBJ*)Surface );
}
/* EOF */
reactos/subsys/win32k/include
diff -u -r1.1.4.8 -r1.1.4.9
--- internal.h 12 Sep 2004 19:21:06 -0000 1.1.4.8
+++ internal.h 13 Sep 2004 21:28:16 -0000 1.1.4.9
@@ -420,7 +420,7 @@
do { \
if(InterlockedDecrement(&(MsgQueue)->References) == 0) \
{ \
- DPRINT("Free message queue 0x%x\n", (MsgQueue)); \
+ DPRINT1("Free message queue 0x%x\n", (MsgQueue)); \
ExFreePool((MsgQueue)); \
} \
} while(0)
reactos/subsys/win32k/ntuser
diff -u -r1.59.8.2 -r1.59.8.3
--- class.c 27 Aug 2004 15:56:05 -0000 1.59.8.2
+++ class.c 13 Sep 2004 21:28:17 -0000 1.59.8.3
@@ -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.2 2004/08/27 15:56:05 weiden Exp $
+/* $Id: class.c,v 1.59.8.3 2004/09/13 21:28:17 weiden Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -293,26 +293,26 @@
{
if(IS_ATOM(ClassName->Buffer))
{
- DbgPrint("XUnable to register class 0x%x (process %d), window station is inaccessible\n", ClassName->Buffer, PsGetCurrentProcessId());
+ DPRINT1("Unable to register class 0x%x (process %d), window station is inaccessible\n", ClassName->Buffer, PsGetCurrentProcessId());
}
else
{
- DbgPrint("XUnable to register class %wZ (process %d), window station is inaccessible\n", ClassName, PsGetCurrentProcessId());
+ DPRINT1("Unable to register class %wZ (process %d), window station is inaccessible\n", ClassName, PsGetCurrentProcessId());
}
return NULL;
}
/* FIXME - check the rights of the thread's desktop if we're allowed to register a class? */
- if(ClassName->Length)
+ if(ClassName->Length > 0)
{
- DPRINT1("IntRegisterClass(%wZ)\n", ClassName);
+ DPRINT("IntRegisterClass(%wZ)\n", ClassName);
Status = RtlAddAtomToAtomTable(WinStaObject->AtomTable,
ClassName->Buffer,
&Atom);
if (!NT_SUCCESS(Status))
{
- DPRINT("Failed adding class name (%wZ) to atom table\n", ClassName);
+ DPRINT1("Failed adding class name (%wZ) to atom table\n", ClassName);
SetLastNtError(Status);
return NULL;
}
@@ -325,7 +325,7 @@
Ret = IntCreateClass(lpwcx, Flags, wpExtra, MenuName, Atom);
if(Ret == NULL)
{
- if(ClassName->Length)
+ if(ClassName->Length > 0)
{
RtlDeleteAtomFromAtomTable(WinStaObject->AtomTable, Atom);
}
reactos/subsys/win32k/ntuser
diff -u -r1.71.4.4 -r1.71.4.5
--- message.c 31 Aug 2004 14:34:39 -0000 1.71.4.4
+++ message.c 13 Sep 2004 21:28:17 -0000 1.71.4.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: message.c,v 1.71.4.4 2004/08/31 14:34:39 weiden Exp $
+/* $Id: message.c,v 1.71.4.5 2004/09/13 21:28:17 weiden Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -670,7 +670,7 @@
/* Nothing found. Wait for new messages. */
Status = MsqWaitForNewMessages(ThreadQueue);
}
- while (STATUS_WAIT_0 <= STATUS_WAIT_0 && Status <= STATUS_WAIT_63);
+ while (STATUS_WAIT_0 <= Status && Status <= STATUS_WAIT_63);
SetLastNtError(Status);
@@ -696,7 +696,10 @@
*GotMessage = IntPeekMessage(Msg, FilterWindow, MsgFilterMin, MsgFilterMax, PM_REMOVE);
if(!(*GotMessage))
{
- IntWaitMessage(FilterWindow, MsgFilterMin, MsgFilterMax);
+ if(!IntWaitMessage(FilterWindow, MsgFilterMin, MsgFilterMax))
+ {
+ return (BOOL)-1;
+ }
}
} while(!GotMessage);
reactos/subsys/win32k/ntuser
diff -u -r1.100.12.3 -r1.100.12.4
--- msgqueue.c 31 Aug 2004 11:38:56 -0000 1.100.12.3
+++ msgqueue.c 13 Sep 2004 21:28:17 -0000 1.100.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: msgqueue.c,v 1.100.12.3 2004/08/31 11:38:56 weiden Exp $
+/* $Id: msgqueue.c,v 1.100.12.4 2004/09/13 21:28:17 weiden Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -374,7 +374,7 @@
do
{
WaitStatus = KeWaitForMultipleObjects(2, WaitObjects, WaitAny, UserRequest,
- UserMode, TRUE, NULL, NULL);
+ UserMode, FALSE, NULL, NULL);
while (MsqDispatchOneSentMessage(MessageQueue));
}
while (NT_SUCCESS(WaitStatus) && STATUS_WAIT_0 != WaitStatus);
@@ -1036,7 +1036,7 @@
WaitAny,
Executive,
UserMode,
- TRUE,
+ FALSE,
NULL,
NULL));
}
reactos/subsys/win32k/ntuser
diff -u -r1.1.4.9 -r1.1.4.10
--- ntuser.c 12 Sep 2004 19:21:07 -0000 1.1.4.9
+++ ntuser.c 13 Sep 2004 21:28:17 -0000 1.1.4.10
@@ -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.9 2004/09/12 19:21:07 weiden Exp $
+/* $Id: ntuser.c,v 1.1.4.10 2004/09/13 21:28:17 weiden Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -602,7 +602,8 @@
LEAVE_CRITICAL();
NTUSER_FAIL_ERROR(ERROR_ACCESS_DENIED);
}
-
+ ASSERT(W32Process);
+ ASSERT(Thread->Win32Thread);
/* FIXME - send messages if the thread is already terminating? */
Result = IntDestroyWindow(Window, W32Process, Thread->Win32Thread, TRUE);
reactos/subsys/win32k/ntuser
diff -u -r1.244.2.6 -r1.244.2.7
--- window.c 12 Sep 2004 19:21:07 -0000 1.244.2.6
+++ window.c 13 Sep 2004 21:28:17 -0000 1.244.2.7
@@ -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: window.c,v 1.244.2.6 2004/09/12 19:21:07 weiden Exp $
+/* $Id: window.c,v 1.244.2.7 2004/09/13 21:28:17 weiden Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -767,7 +767,7 @@
/* Lookup and reference the class object */
if(!IntReferenceClassByNameOrAtom(&ClassObject, ClassName, hInstance))
{
- DbgPrint("Failed to reference class: 0x%x, %S\n", (ClassName ? ClassName->Buffer : NULL), (ClassName ? ClassName->Buffer : L"?!"));
+ DPRINT1("Failed to reference class: 0x%x, %S\n", (ClassName ? ClassName->Buffer : NULL), (ClassName ? ClassName->Buffer : L"<NULL>"));
ObDereferenceObject(WinStaObject);
return NULL;
}
reactos/subsys/win32k/objects
diff -u -r1.144.2.2 -r1.144.2.3
--- dc.c 12 Sep 2004 19:21:08 -0000 1.144.2.2
+++ dc.c 13 Sep 2004 21:28:17 -0000 1.144.2.3
@@ -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: dc.c,v 1.144.2.2 2004/09/12 19:21:08 weiden Exp $
+/* $Id: dc.c,v 1.144.2.3 2004/09/13 21:28:17 weiden Exp $
*
* DC.C - Device context functions
*
@@ -647,9 +647,12 @@
}
SurfObj = EngLockSurface((HSURF)PrimarySurface.Handle);
- SurfObj->dhpdev = PrimarySurface.PDev;
- SurfSize = SurfObj->sizlBitmap;
- EngUnlockSurface(SurfObj);
+ if(SurfObj != NULL)
+ {
+ SurfObj->dhpdev = PrimarySurface.PDev;
+ SurfSize = SurfObj->sizlBitmap;
+ EngUnlockSurface(SurfObj);
+ }
IntShowDesktop(IntGetInputDesktop(), SurfSize.cx, SurfSize.cy);
break;
}
@@ -740,6 +743,8 @@
NewDC->DMW.dmLogPixels = 96;
SurfObj = EngLockSurface((HSURF)PrimarySurface.Handle);
+ DbgPrint("PrimarySurface.Handle: 0x%x\n", PrimarySurface.Handle);
+ ASSERT(SurfObj);
NewDC->DMW.dmBitsPerPel = BitsPerFormat(SurfObj->iBitmapFormat);
NewDC->DMW.dmPelsWidth = SurfObj->sizlBitmap.cx;
NewDC->DMW.dmPelsHeight = SurfObj->sizlBitmap.cy;
reactos/subsys/win32k/objects
diff -u -r1.71.4.1 -r1.71.4.2
--- gdiobj.c 12 Sep 2004 19:21:08 -0000 1.71.4.1
+++ gdiobj.c 13 Sep 2004 21:28:17 -0000 1.71.4.2
@@ -19,7 +19,7 @@
/*
* GDIOBJ.C - GDI object manipulation routines
*
- * $Id: gdiobj.c,v 1.71.4.1 2004/09/12 19:21:08 weiden Exp $
+ * $Id: gdiobj.c,v 1.71.4.2 2004/09/13 21:28:17 weiden Exp $
*/
#include <w32k.h>
@@ -28,7 +28,7 @@
/* FIXME - This is a HACK!!!!!! If you don't get the warnings anymore, this hack
should be removed immediately!! */
-#define IGNORE_PID_WHILE_LOCKING
+//#define IGNORE_PID_WHILE_LOCKING
#ifdef __USE_W32API
/* F*(&#$ header mess!!!! */
@@ -940,9 +940,9 @@
PGDI_TABLE_ENTRY Entry;
LONG ProcessId, LockedProcessId, PrevProcId;
- DPRINT("GDIOBJ_SetOwnership: hObj: 0x%x, NewProcess: 0x%x\n", ObjectHandle, NewOwner);
+ DPRINT1("GDIOBJ_SetOwnership: hObj: 0x%x, NewProcess: 0x%x\n", ObjectHandle, (NewOwner ? PsGetProcessId(NewOwner) : 0));
- if(!GDI_HANDLE_IS_STOCKOBJ(ObjectHandle) && NewOwner != NULL)
+ if(!GDI_HANDLE_IS_STOCKOBJ(ObjectHandle))
{
/* shift the process id to the left so we can use the first bit to lock the object.
FIXME - don't shift once ROS' PIDs match with nt! */
CVSspam 0.2.8