Why are you duplicating the value? Is that needed for something? And in case of SPI_SETMOUSECLICKLOCK pvParam is not a pointer to a BOOL, it is the BOOL value itself.
mkupfer@svn.reactos.org schrieb:
Author: mkupfer Date: Wed Oct 7 16:25:52 2009 New Revision: 43325
URL: http://svn.reactos.org/svn/reactos?rev=43325&view=rev Log:
- some preparation for ClickLock implementation
Modified: trunk/reactos/subsystems/win32/win32k/include/cursoricon.h trunk/reactos/subsystems/win32/win32k/ntuser/sysparams.c trunk/reactos/subsystems/win32/win32k/ntuser/winsta.c
Modified: trunk/reactos/subsystems/win32/win32k/include/cursoricon.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/inc... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/include/cursoricon.h [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/include/cursoricon.h [iso-8859-1] Wed Oct 7 16:25:52 2009 @@ -41,6 +41,8 @@ typedef struct _SYSTEM_CURSORINFO { BOOL Enabled;
- BOOL ClickLockActive;
- DWORD ClickLockTime;
// BOOL SwapButtons; UINT ButtonsDown; CURSORCLIP_INFO CursorClipInfo;
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/sysparams.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ntu... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/sysparams.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/sysparams.c [iso-8859-1] Wed Oct 7 16:25:52 2009 @@ -263,6 +263,7 @@ gspv.iWheelScrollLines = SpiLoadInt(KEY_DESKTOP, VAL_SCRLLLINES, 3); gspv.dwMouseClickLockTime = SpiLoadDWord(KEY_DESKTOP, VAL_CLICKLOCKTIME, 1200); gspv.dwUserPrefMask = SpiLoadUserPrefMask(UPM_DEFAULT);
- gspv.bMouseClickLock = (gspv.dwUserPrefMask & UPM_CLICKLOCK) != 0;
#if (_WIN32_WINNT >= 0x0600) gspv.iWheelScrollChars = SpiLoadInt(KEY_DESKTOP, VAL_SCRLLCHARS, 3); #endif @@ -1322,6 +1323,7 @@ return SpiGetUserPref(UPM_CLICKLOCK, pvParam, fl);
case SPI_SETMOUSECLICKLOCK:
gspv.bMouseClickLock = *(BOOL*) pvParam; return SpiSetUserPref(UPM_CLICKLOCK, pvParam, fl); case SPI_GETMOUSEVANISH:Modified: trunk/reactos/subsystems/win32/win32k/ntuser/winsta.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ntu... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/winsta.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/winsta.c [iso-8859-1] Wed Oct 7 16:25:52 2009 @@ -537,6 +537,8 @@ CurInfo->LastBtnDown = 0; CurInfo->CurrentCursorObject = NULL; CurInfo->ShowingCursor = 0;
- CurInfo->ClickLockActive = FALSE;
- CurInfo->ClickLockTime = 0;
/* // not used anymore
Hello,
Am Mittwoch, 7. Oktober 2009 18:18:24 schrieb Timo Kreuzer:
Why are you duplicating the value? Is that needed for something?
It's not duplicated value, it's used to mark the current ClickLock state, maybe ClickLockTime can be removed.
And in case of SPI_SETMOUSECLICKLOCK pvParam is not a pointer to a BOOL, it is the BOOL value itself.
No, it' isn't, we are both wrong pvParam is NULL and the value is stored in uiParam: http://msdn.microsoft.com/en-us/library/ms724947%28VS.85%29.aspx
Regards, Matthias
Matthias Kupfer schrieb:
Hello,
Am Mittwoch, 7. Oktober 2009 18:18:24 schrieb Timo Kreuzer:
Why are you duplicating the value? Is that needed for something?
It's not duplicated value, it's used to mark the current ClickLock state, maybe ClickLockTime can be removed.
It already stored in gspv.dwUserPrefMask, so it's redundant. And why could ClickLockTime be removed?
And in case of SPI_SETMOUSECLICKLOCK pvParam is not a pointer to a BOOL, it is the BOOL value itself.
No, it' isn't, we are both wrong pvParam is NULL and the value is stored in uiParam: http://msdn.microsoft.com/en-us/library/ms724947%28VS.85%29.aspx
Did you recently check the page you are referring to? Hint: look at the bottom of the page. Don't trust in MSDN without checking.
It's not duplicated value, it's used to mark the current ClickLock state, maybe ClickLockTime can be removed.
It already stored in gspv.dwUserPrefMask, so it's redundant. And why could ClickLockTime be removed?
You need 2 variables, one for the ClickLock feature in general (stored in gspv) and one fur the current ClickLock state of primary button. This one is the second one. ClickLockTime isn't needed if you check the time on BUTTONUP.
And in case of SPI_SETMOUSECLICKLOCK pvParam is not a pointer to a BOOL, it is the BOOL value itself.
No, it' isn't, we are both wrong pvParam is NULL and the value is stored in uiParam: http://msdn.microsoft.com/en-us/library/ms724947%28VS.85%29.aspx
Did you recently check the page you are referring to? Hint: look at the bottom of the page. Don't trust in MSDN without checking.
Okay, i will revert this, but MS violates almost all rules of good and safe programming doing it that way...