https://git.reactos.org/?p=reactos.git;a=commitdiff;h=162de4a0d880ef36944a8…
commit 162de4a0d880ef36944a845580d6b01ea7414f10
Author: Hervé Poussineau <hpoussin(a)reactos.org>
AuthorDate: Tue Oct 11 18:56:04 2022 +0200
Commit: Hervé Poussineau <hpoussin(a)reactos.org>
CommitDate: Tue Oct 11 19:04:59 2022 +0200
[WIN32SS:ENG] Call display mouse functions only when using hardware pointer
Otherwise, use software pointer functions.
This fixes graphical glitches on cursor change, when the display driver
provides accelerated pointer functions (DrvSetPointerShape/DrvMovePointer),
but refuses to handle a certain cursor.
These graphical glitches may be reproduced:
- by using Voodoo driver SFFT 1.9
- by using framebuf_new.dll instead of framebuf.dll
- by using the panning driver (setting DefaultSettings.XPanning and
DefaultSettings.YPanning in registry)
---
win32ss/gdi/eng/mouse.c | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/win32ss/gdi/eng/mouse.c b/win32ss/gdi/eng/mouse.c
index c8de250aa1f..9cbadcd87a7 100644
--- a/win32ss/gdi/eng/mouse.c
+++ b/win32ss/gdi/eng/mouse.c
@@ -84,7 +84,10 @@ MouseSafetyOnDrawStart(
&& pgp->Exclude.top <= HazardY2)
{
ppdev->SafetyRemoveLevel = ppdev->SafetyRemoveCount;
- ppdev->pfnMovePointer(&ppdev->pSurface->SurfObj, -1, -1, NULL);
+ if (ppdev->flFlags & PDEV_HARDWARE_POINTER)
+ ppdev->pfnMovePointer(&ppdev->pSurface->SurfObj, -1, -1, NULL);
+ else if (ppdev->flFlags & PDEV_SOFTWARE_POINTER)
+ EngMovePointer(&ppdev->pSurface->SurfObj, -1, -1, NULL);
}
return TRUE;
@@ -116,10 +119,16 @@ MouseSafetyOnDrawEnd(
return FALSE;
}
- ppdev->pfnMovePointer(&ppdev->pSurface->SurfObj,
- gpsi->ptCursor.x,
- gpsi->ptCursor.y,
- &pgp->Exclude);
+ if (ppdev->flFlags & PDEV_HARDWARE_POINTER)
+ ppdev->pfnMovePointer(&ppdev->pSurface->SurfObj,
+ gpsi->ptCursor.x,
+ gpsi->ptCursor.y,
+ &pgp->Exclude);
+ else if (ppdev->flFlags & PDEV_SOFTWARE_POINTER)
+ EngMovePointer(&ppdev->pSurface->SurfObj,
+ gpsi->ptCursor.x,
+ gpsi->ptCursor.y,
+ &pgp->Exclude);
ppdev->SafetyRemoveLevel = 0;