tinus <o112w8r02(a)sneakemail.com>
This patch fixes some weirdness in the clipping logic. It also seems to
make
these 'black cursor' images happen less often, but I can't tell for
sure.
Modified: trunk/reactos/include/win32k/dc.h
Modified: trunk/reactos/subsys/win32k/eng/mouse.c
_____
Modified: trunk/reactos/include/win32k/dc.h
--- trunk/reactos/include/win32k/dc.h 2005-01-19 14:15:29 UTC (rev
13132)
+++ trunk/reactos/include/win32k/dc.h 2005-01-19 14:25:10 UTC (rev
13133)
@@ -124,7 +124,8 @@
RECTL Exclude; /* required publicly for SPS_ACCEPT_EXCLUDE */
PGD_MOVEPOINTER MovePointer;
ULONG Status;
- BOOL SafetySwitch;
+ UINT SafetyRemoveLevel; /* at what level was the cursor removed?
+ 0 for not removed */
UINT SafetyRemoveCount;
} GDIPOINTER, *PGDIPOINTER;
_____
Modified: trunk/reactos/subsys/win32k/eng/mouse.c
--- trunk/reactos/subsys/win32k/eng/mouse.c 2005-01-19 14:15:29 UTC
(rev 13132)
+++ trunk/reactos/subsys/win32k/eng/mouse.c 2005-01-19 14:25:10 UTC
(rev 13133)
@@ -68,16 +68,20 @@
tmp = HazardY2; HazardY2 = HazardY1; HazardY1 = tmp;
}
+ pgp->SafetyRemoveCount++;
+
+ if (pgp->SafetyRemoveLevel)
+ {
+ /* already hidden */
+ return FALSE;
+ }
+
if (pgp->Exclude.right >= HazardX1
&& pgp->Exclude.left <= HazardX2
&& pgp->Exclude.bottom >= HazardY1
&& pgp->Exclude.top <= HazardY2)
{
- if (0 != pgp->SafetyRemoveCount++)
- {
- return FALSE;
- }
- pgp->SafetySwitch = TRUE;
+ pgp->SafetyRemoveLevel = pgp->SafetyRemoveCount;
if (pgp->MovePointer)
pgp->MovePointer(SurfObj, -1, -1, NULL);
else
@@ -113,26 +117,23 @@
return FALSE;
}
- if (pgp->SafetySwitch)
- {
- if (1 < pgp->SafetyRemoveCount--)
- {
- /* Someone else removed it too, let them restore it */
- return FALSE;
- }
- /* FIXME - this is wrong!!!!!! we must NOT access pgp->Pos from
here, it's
- a private field for ENG/driver. This will paint the
cursor to the
- wrong screen coordinates when a driver overrides
DrvMovePointer()!
- We should store the coordinates before calling
Drv/EngMovePointer()
- and Drv/EngSetPointerShape() separately in the
GDIDEVICE structure
- or somewhere where ntuser can access it! */
- if (pgp->MovePointer)
- pgp->MovePointer(SurfObj, pgp->Pos.x, pgp->Pos.y,
&pgp->Exclude);
- else
- EngMovePointer(SurfObj, pgp->Pos.x, pgp->Pos.y, &pgp->Exclude);
- pgp->SafetySwitch = FALSE;
- }
+ if (--pgp->SafetyRemoveCount >= pgp->SafetyRemoveLevel)
+ {
+ return FALSE;
+ }
+ /* FIXME - this is wrong!!!!!! we must NOT access pgp->Pos from
here, it's
+ a private field for ENG/driver. This will paint the cursor
to the
+ wrong screen coordinates when a driver overrides
DrvMovePointer()!
+ We should store the coordinates before calling
Drv/EngMovePointer()
+ and Drv/EngSetPointerShape() separately in the GDIDEVICE
structure
+ or somewhere where ntuser can access it! */
+ if (pgp->MovePointer)
+ pgp->MovePointer(SurfObj, pgp->Pos.x, pgp->Pos.y, &pgp->Exclude);
+ else
+ EngMovePointer(SurfObj, pgp->Pos.x, pgp->Pos.y, &pgp->Exclude);
+ pgp->SafetyRemoveLevel = 0;
+
return(TRUE);
}
Change UNIMPLEMENTED to DPRINT1 for NtGdiRemoveFontResource to make the
MS Office installer a little more happy
Modified: trunk/reactos/subsys/win32k/objects/text.c
_____
Modified: trunk/reactos/subsys/win32k/objects/text.c
--- trunk/reactos/subsys/win32k/objects/text.c 2005-01-19 03:33:43 UTC
(rev 13130)
+++ trunk/reactos/subsys/win32k/objects/text.c 2005-01-19 06:51:35 UTC
(rev 13131)
@@ -2661,7 +2661,7 @@
STDCALL
NtGdiRemoveFontResource(LPCWSTR FileName)
{
- UNIMPLEMENTED;
+ DPRINT1("NtGdiRemoveFontResource is UNIMPLEMENTED\n");
return FALSE;
}
Fix to unbreak tree. This is temporary until I come up with a good
NtCurrentPeb macro that can be shared. Note that the brekage is because
an ntdll only function was put in rtl but never used from ntoskrnl until
my previous patch. It could be shared, but I need to do some work on it.
Modified: trunk/reactos/lib/ntdll/rtl/ppb.c
Modified: trunk/reactos/lib/rtl/env.c
_____
Modified: trunk/reactos/lib/ntdll/rtl/ppb.c
--- trunk/reactos/lib/ntdll/rtl/ppb.c 2005-01-18 05:52:54 UTC (rev
13116)
+++ trunk/reactos/lib/ntdll/rtl/ppb.c 2005-01-18 06:00:55 UTC (rev
13117)
@@ -30,27 +30,6 @@
/* FUNCTIONS
****************************************************************/
-/*
- * @implemented
- */
-VOID STDCALL
-RtlAcquirePebLock(VOID)
-{
- PPEB Peb = NtCurrentPeb ();
- Peb->FastPebLockRoutine (Peb->FastPebLock);
-}
-
-
-/*
- * @implemented
- */
-VOID STDCALL
-RtlReleasePebLock(VOID)
-{
- PPEB Peb = NtCurrentPeb ();
- Peb->FastPebUnlockRoutine (Peb->FastPebLock);
-}
-
static inline VOID
RtlpCopyParameterString(PWCHAR *Ptr,
PUNICODE_STRING Destination,
_____
Modified: trunk/reactos/lib/rtl/env.c
--- trunk/reactos/lib/rtl/env.c 2005-01-18 05:52:54 UTC (rev 13116)
+++ trunk/reactos/lib/rtl/env.c 2005-01-18 06:00:55 UTC (rev 13117)
@@ -22,9 +22,31 @@
/* FUNCTIONS
*****************************************************************/
+/* FIXME: Added here temporarly until I fix this properly tomorrow */
/*
* @implemented
*/
+VOID STDCALL
+RtlAcquirePebLock(VOID)
+{
+ PPEB Peb = NtCurrentPeb ();
+ Peb->FastPebLockRoutine (Peb->FastPebLock);
+}
+
+/* FIXME: Added here temporarly until I fix this properly tomorrow */
+/*
+ * @implemented
+ */
+VOID STDCALL
+RtlReleasePebLock(VOID)
+{
+ PPEB Peb = NtCurrentPeb ();
+ Peb->FastPebUnlockRoutine (Peb->FastPebLock);
+}
+
+/*
+ * @implemented
+ */
NTSTATUS STDCALL
RtlCreateEnvironment(BOOLEAN Inherit,
PWSTR *Environment)
fixed prototype of NtNotifyChangeKey()
Modified: trunk/reactos/include/ntos/zw.h
Modified: trunk/reactos/ntoskrnl/cm/ntfunc.c
_____
Modified: trunk/reactos/include/ntos/zw.h
--- trunk/reactos/include/ntos/zw.h 2005-01-18 22:36:39 UTC (rev
13126)
+++ trunk/reactos/include/ntos/zw.h 2005-01-18 22:47:16 UTC (rev
13127)
@@ -1887,10 +1887,10 @@
IN PVOID ApcContext OPTIONAL,
OUT PIO_STATUS_BLOCK IoStatusBlock,
IN ULONG CompletionFilter,
- IN BOOLEAN Asynchroneous,
- OUT PVOID ChangeBuffer,
+ IN BOOLEAN WatchSubtree,
+ OUT PVOID Buffer,
IN ULONG Length,
- IN BOOLEAN WatchSubtree
+ IN BOOLEAN Asynchronous
);
NTSTATUS
@@ -1902,10 +1902,10 @@
IN PVOID ApcContext OPTIONAL,
OUT PIO_STATUS_BLOCK IoStatusBlock,
IN ULONG CompletionFilter,
- IN BOOLEAN Asynchroneous,
- OUT PVOID ChangeBuffer,
+ IN BOOLEAN WatchSubtree,
+ OUT PVOID Buffer,
IN ULONG Length,
- IN BOOLEAN WatchSubtree
+ IN BOOLEAN Asynchronous
);
/*
_____
Modified: trunk/reactos/ntoskrnl/cm/ntfunc.c
--- trunk/reactos/ntoskrnl/cm/ntfunc.c 2005-01-18 22:36:39 UTC (rev
13126)
+++ trunk/reactos/ntoskrnl/cm/ntfunc.c 2005-01-18 22:47:16 UTC (rev
13127)
@@ -1796,10 +1796,10 @@
IN PVOID ApcContext OPTIONAL,
OUT PIO_STATUS_BLOCK IoStatusBlock,
IN ULONG CompletionFilter,
- IN BOOLEAN Asynchroneous,
- OUT PVOID ChangeBuffer,
+ IN BOOLEAN WatchSubtree,
+ OUT PVOID Buffer,
IN ULONG Length,
- IN BOOLEAN WatchSubtree)
+ IN BOOLEAN Asynchronous)
{
UNIMPLEMENTED;
return(STATUS_NOT_IMPLEMENTED);