Author: rharabien
Date: Mon May 2 11:38:30 2011
New Revision: 51552
URL:
http://svn.reactos.org/svn/reactos?rev=51552&view=rev
Log:
[WIN32K]
* Fix ShowingCursor counter interpretation. Values >= 0 means cursor is shown, values
<0 means cursor is hidden. Fixes few user32:cursoricon tests.
Modified:
trunk/reactos/subsystems/win32/win32k/ntuser/cursoricon.c
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/cursoricon.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/cursoricon.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/cursoricon.c [iso-8859-1] Mon May 2
11:38:30 2011
@@ -63,7 +63,7 @@
gSysCursorInfo.bClipped = FALSE;
gSysCursorInfo.LastBtnDown = 0;
gSysCursorInfo.CurrentCursorObject = NULL;
- gSysCursorInfo.ShowingCursor = 0;
+ gSysCursorInfo.ShowingCursor = -1;
gSysCursorInfo.ClickLockActive = FALSE;
gSysCursorInfo.ClickLockTime = 0;
@@ -129,7 +129,7 @@
/* Do we have a new cursor? */
if (NewCursor)
{
- CurInfo->ShowingCursor = 1;
+ CurInfo->ShowingCursor = 0;
CurInfo->CurrentCursorObject = NewCursor;
/* Call GDI to set the new screen cursor */
@@ -144,7 +144,7 @@
else
{
/* Check if were diplaying a cursor */
- if (OldCursor && CurInfo->ShowingCursor)
+ if (OldCursor && CurInfo->ShowingCursor >= 0)
{
/* Remove the cursor */
GreMovePointer(hdcScreen, -1, -1);
@@ -152,7 +152,7 @@
}
CurInfo->CurrentCursorObject = NULL;
- CurInfo->ShowingCursor = 0;
+ CurInfo->ShowingCursor = -1;
}
/* Return the old cursor */
@@ -219,13 +219,13 @@
if (!(hdcScreen = IntGetScreenDC()))
{
- return 0; /* No mouse */
+ return -1; /* No mouse */
}
if (bShow == FALSE)
{
/* Check if were diplaying a cursor */
- if (CurInfo->ShowingCursor == 1)
+ if (CurInfo->ShowingCursor == 0)
{
/* Remove the pointer */
GreMovePointer(hdcScreen, -1, -1);
@@ -235,7 +235,7 @@
}
else
{
- if (CurInfo->ShowingCursor == 0)
+ if (CurInfo->ShowingCursor == -1)
{
/*Show the pointer*/
GreMovePointer(hdcScreen, gpsi->ptCursor.x, gpsi->ptCursor.y);
@@ -621,7 +621,7 @@
CurIcon = (PCURICON_OBJECT)CurInfo->CurrentCursorObject;
SafeCi.cbSize = sizeof(CURSORINFO);
- SafeCi.flags = ((CurInfo->ShowingCursor && CurIcon) ? CURSOR_SHOWING :
0);
+ SafeCi.flags = ((CurIcon && CurInfo->ShowingCursor >= 0) ?
CURSOR_SHOWING : 0);
SafeCi.hCursor = (CurIcon ? (HCURSOR)CurIcon->Self : (HCURSOR)0);
SafeCi.ptScreenPos = gpsi->ptCursor;