Author: mkupfer
Date: Mon Oct 5 21:53:15 2009
New Revision: 43307
URL:
http://svn.reactos.org/svn/reactos?rev=43307&view=rev
Log:
- add new desktop and mouse property keys to registry
- disable global settings from _SYSTEM_CURSORINFO and change files accordingly
- bind and load added registry keys for SystemParametersInfo
- TODO: read and set via SystemParametersInfo still incomplete
Modified:
trunk/reactos/boot/bootdata/hivedef_arm.inf
trunk/reactos/boot/bootdata/hivedef_i386.inf
trunk/reactos/subsystems/win32/win32k/include/cursoricon.h
trunk/reactos/subsystems/win32/win32k/ntuser/metric.c
trunk/reactos/subsystems/win32/win32k/ntuser/msgqueue.c
trunk/reactos/subsystems/win32/win32k/ntuser/sysparams.c
trunk/reactos/subsystems/win32/win32k/ntuser/winsta.c
Modified: trunk/reactos/boot/bootdata/hivedef_arm.inf
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/hivedef_arm.…
==============================================================================
--- trunk/reactos/boot/bootdata/hivedef_arm.inf [iso-8859-1] (original)
+++ trunk/reactos/boot/bootdata/hivedef_arm.inf [iso-8859-1] Mon Oct 5 21:53:15 2009
@@ -13,6 +13,12 @@
HKCU,"Control
Panel\Mouse","MouseThreshold2",0x00000002,"10"
HKCU,"Control
Panel\Mouse","DoubleClickSpeed",0x00000002,"480"
HKCU,"Control
Panel\Mouse","SwapMouseButtons",0x00000002,"0"
+HKCU,"Control
Panel\Mouse","MouseSensitivity",0x00000002,"10"
+HKCU,"Control
Panel\Mouse","MouseHoverTime",0x00000002,"400"
+HKCU,"Control
Panel\Mouse","MouseHoverWidth",0x00000002,"4"
+HKCU,"Control
Panel\Mouse","MouseHoverHeight",0x00000002,"4"
+HKCU,"Control
Panel\Mouse","DoubleClickWidth",0x00000002,"4"
+HKCU,"Control
Panel\Mouse","DoubleClickHeight",0x00000002,"4"
HKCU,"Control Panel\Desktop","AutoEndTasks",0x00000002,"0"
HKCU,"Control
Panel\Desktop","CursorBlinkRate",0x00000002,"530"
@@ -22,6 +28,25 @@
HKCU,"Control Panel\Desktop","SCRNSAVE.EXE",0x00000000,""
HKCU,"Control
Panel\Desktop","WaitToKillAppTimeout",0x00000002,"20000"
HKCU,"Control Panel\Desktop","Wallpaper",0x00000000,""
+HKCU,"Control Panel\Desktop","FontSmoothing",2,"0"
+HKCU,"Control Panel\Desktop","SmoothScroll",3,00,00,00,00
+HKCU,"Control Panel\Desktop","UserPreferenceMask",3,10,00,00,80
+HKCU,"Control Panel\Desktop","LowPowerActive",,"0"
+HKCU,"Control Panel\Desktop","MenuShowDelay",2,"400"
+HKCU,"Control Panel\Desktop","WheelScrollLines",2,"3"
+HKCU,"Control Panel\Desktop","WheelScrollChars",2,"3"
+
+HKCU,"Control
Panel\Desktop\WindowMetrics","ScrollWidth",2,"16"
+HKCU,"Control
Panel\Desktop\WindowMetrics","ScrollHeight",2,"16"
+HKCU,"Control
Panel\Desktop\WindowMetrics","CaptionWidth",2,"18"
+HKCU,"Control
Panel\Desktop\WindowMetrics","CaptionHeight",2,"18"
+HKCU,"Control
Panel\Desktop\WindowMetrics","SmCaptionWidth",2,"13"
+HKCU,"Control
Panel\Desktop\WindowMetrics","SmCaptionHeight",2,"15"
+HKCU,"Control
Panel\Desktop\WindowMetrics","MenuWidth",2,"18"
+HKCU,"Control
Panel\Desktop\WindowMetrics","MenuHeight",2,"18"
+HKCU,"Control
Panel\Desktop\WindowMetrics","BorderWidth",2,"1"
+HKCU,"Control Panel\Desktop\WindowMetrics","Shell Icon
Size",2,"32"
+
HKCU,"Control Panel\International",,0x00000012
HKCU,"Control
Panel\International","Locale",0x00000000,"0409"
HKCU,"Control
Panel\International\Geo","Nation",0x00000000,"1"
Modified: trunk/reactos/boot/bootdata/hivedef_i386.inf
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/hivedef_i386…
==============================================================================
--- trunk/reactos/boot/bootdata/hivedef_i386.inf [iso-8859-1] (original)
+++ trunk/reactos/boot/bootdata/hivedef_i386.inf [iso-8859-1] Mon Oct 5 21:53:15 2009
@@ -11,8 +11,14 @@
HKCU,"Control Panel\Mouse","MouseSpeed",0x00000002,"1"
HKCU,"Control
Panel\Mouse","MouseThreshold1",0x00000002,"6"
HKCU,"Control
Panel\Mouse","MouseThreshold2",0x00000002,"10"
-HKCU,"Control
Panel\Mouse","DoubleClickSpeed",0x00000002,"480"
+HKCU,"Control
Panel\Mouse","DoubleClickSpeed",0x00000002,"500"
HKCU,"Control
Panel\Mouse","SwapMouseButtons",0x00000002,"0"
+HKCU,"Control
Panel\Mouse","MouseSensitivity",0x00000002,"10"
+HKCU,"Control
Panel\Mouse","MouseHoverTime",0x00000002,"400"
+HKCU,"Control
Panel\Mouse","MouseHoverWidth",0x00000002,"4"
+HKCU,"Control
Panel\Mouse","MouseHoverHeight",0x00000002,"4"
+HKCU,"Control
Panel\Mouse","DoubleClickWidth",0x00000002,"4"
+HKCU,"Control
Panel\Mouse","DoubleClickHeight",0x00000002,"4"
HKCU,"Control Panel\Desktop","AutoEndTasks",0x00000002,"0"
HKCU,"Control
Panel\Desktop","CursorBlinkRate",0x00000002,"530"
@@ -27,6 +33,8 @@
HKCU,"Control Panel\Desktop","UserPreferenceMask",3,10,00,00,80
HKCU,"Control Panel\Desktop","LowPowerActive",,"0"
HKCU,"Control Panel\Desktop","MenuShowDelay",2,"400"
+HKCU,"Control Panel\Desktop","WheelScrollLines",2,"3"
+HKCU,"Control Panel\Desktop","WheelScrollChars",2,"3"
HKCU,"Control
Panel\Desktop\WindowMetrics","ScrollWidth",2,"16"
HKCU,"Control
Panel\Desktop\WindowMetrics","ScrollHeight",2,"16"
Modified: trunk/reactos/subsystems/win32/win32k/include/cursoricon.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/include/cursoricon.h [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/include/cursoricon.h [iso-8859-1] Mon Oct 5
21:53:15 2009
@@ -41,14 +41,15 @@
typedef struct _SYSTEM_CURSORINFO
{
BOOL Enabled;
- BOOL SwapButtons;//
+// BOOL SwapButtons;
UINT ButtonsDown;
CURSORCLIP_INFO CursorClipInfo;
PCURICON_OBJECT CurrentCursorObject;
-// UINT WheelScroLines;
-// UINT WheelScroChars;
BYTE ShowingCursor;
- UINT DblClickSpeed;//
+/*
+ UINT WheelScroLines;
+ UINT WheelScroChars;
+ UINT DblClickSpeed;
UINT DblClickWidth;
UINT DblClickHeight;
@@ -56,9 +57,9 @@
UINT MouseHoverWidth;
UINT MouseHoverHeight;
-// UINT MouseSpeed;
-// CURSORACCELERATION_INFO CursorAccelerationInfo;
-
+ UINT MouseSpeed;
+ CURSORACCELERATION_INFO CursorAccelerationInfo;
+*/
DWORD LastBtnDown;
LONG LastBtnDownX;
LONG LastBtnDownY;
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/metric.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/metric.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/metric.c [iso-8859-1] Mon Oct 5 21:53:15
2009
@@ -133,9 +133,9 @@
piSysMet[SM_MOUSEPRESENT] = 1;
piSysMet[SM_MOUSEWHEELPRESENT] = 1;
piSysMet[SM_CMOUSEBUTTONS] = 2;
- piSysMet[SM_SWAPBUTTON] = gspv.bMouseBtnSwap ? 1 : 0; //CurInfo ?
CurInfo->SwapButtons : 0;
- piSysMet[SM_CXDOUBLECLK] = gspv.iDblClickWidth;//CurInfo ? CurInfo->DblClickWidth
: 4;
- piSysMet[SM_CYDOUBLECLK] = gspv.iDblClickHeight;//CurInfo ? CurInfo->DblClickWidth
: 4;
+ piSysMet[SM_SWAPBUTTON] = gspv.bMouseBtnSwap ? 1 : 0;
+ piSysMet[SM_CXDOUBLECLK] = gspv.iDblClickWidth;
+ piSysMet[SM_CYDOUBLECLK] = gspv.iDblClickHeight;
#if (_WIN32_WINNT >= 0x0600)
piSysMet[SM_MOUSEHORIZONTALWHEELPRESENT] = 0;
#endif
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/msgqueue.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/msgqueue.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/msgqueue.c [iso-8859-1] Mon Oct 5
21:53:15 2009
@@ -251,7 +251,7 @@
CurInfo = IntGetSysCursorInfo(WinStaObject);
Res = (Msg->hwnd == (HWND)CurInfo->LastClkWnd) &&
- ((Msg->time - CurInfo->LastBtnDown) < CurInfo->DblClickSpeed);
+ ((Msg->time - CurInfo->LastBtnDown) < gspv.iDblClickTime);
if(Res)
{
@@ -262,8 +262,8 @@
if(dY < 0)
dY = -dY;
- Res = (dX <= CurInfo->DblClickWidth) &&
- (dY <= CurInfo->DblClickHeight);
+ Res = (dX <= gspv.iDblClickWidth) &&
+ (dY <= gspv.iDblClickHeight);
if(Res)
{
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/sysparams.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/sysparams.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/sysparams.c [iso-8859-1] Mon Oct 5
21:53:15 2009
@@ -52,6 +52,10 @@
static const WCHAR* VAL_DBLCLKTIME = L"DoubleClickSpeed";
static const WCHAR* VAL_SNAPDEFBTN = L"SnapToDefaultButton";
static const WCHAR* VAL_SWAP = L"SwapMouseButtons";
+static const WCHAR* VAL_HOVERTIME = L"MouseHoverTime";
+static const WCHAR* VAL_HOVERWIDTH = L"MouseHoverWidth";
+static const WCHAR* VAL_HOVERHEIGHT = L"MouseHoverHeight";
+//static const WCHAR* VAL_SENSITIVITY = L"MouseSensitivity";
static const WCHAR* KEY_DESKTOP = L"Control Panel\\Desktop";
static const WCHAR* VAL_SCRTO = L"ScreenSaveTimeOut";
@@ -61,6 +65,10 @@
static const WCHAR* VAL_DRAGHEIGHT = L"DragHeight";
static const WCHAR* VAL_DRAGWIDTH = L"DragWidth";
static const WCHAR* VAL_FNTSMOOTH = L"FontSmoothing";
+static const WCHAR* VAL_SCRLLLINES = L"WheelScrollLines";
+#if (_WIN32_WINNT >= 0x0600)
+static const WCHAR* VAL_SCRLLCHARS = L"WheelScrollChars";
+#endif
static const WCHAR* KEY_MDALIGN = L"Software\\Microsoft\\Windows
NT\\CurrentVersion\\Windows";
static const WCHAR* VAL_MDALIGN = L"MenuDropAlignment";
@@ -179,14 +187,16 @@
/* Load mouse settings */
gspv.caiMouse.FirstThreshold = SpiLoadMouse(VAL_MOUSE1, 6);
gspv.caiMouse.SecondThreshold = SpiLoadMouse(VAL_MOUSE2, 10);
- gspv.caiMouse.Acceleration = SpiLoadMouse(VAL_MOUSE3, 1);
+ gspv.caiMouse.Acceleration = gspv.iMouseSpeed = SpiLoadMouse(VAL_MOUSE3, 1);
gspv.bMouseBtnSwap = SpiLoadMouse(VAL_SWAP, 0);
gspv.bSnapToDefBtn = SpiLoadMouse(VAL_SNAPDEFBTN, 0);
gspv.iMouseTrails = SpiLoadMouse(VAL_MOUSETRAILS, 0);
- gspv.iMouseSpeed = SpiLoadMouse(VAL_MOUSE3, 1);
- gspv.iDblClickTime = SpiLoadMouse(VAL_DBLCLKTIME, 480);
+ gspv.iDblClickTime = SpiLoadMouse(VAL_DBLCLKTIME, 500);
gspv.iDblClickWidth = SpiLoadMouse(VAL_DBLCLKWIDTH, 4);
gspv.iDblClickHeight = SpiLoadMouse(VAL_DBLCLKHEIGHT, 4);
+ gspv.iMouseHoverTime = SpiLoadMouse(VAL_HOVERTIME, 400);
+ gspv.iMouseHoverWidth = SpiLoadMouse(VAL_HOVERWIDTH, 4);
+ gspv.iMouseHoverHeight = SpiLoadMouse(VAL_HOVERHEIGHT, 4);
/* Load NONCLIENTMETRICS */
gspv.ncm.cbSize = sizeof(NONCLIENTMETRICSW);
@@ -224,15 +234,12 @@
/* Load desktop settings */
gspv.bDragFullWindows = SpiLoadInt(KEY_DESKTOP, VAL_DRAG, 0);
+ gspv.iWheelScrollLines = SpiLoadInt(KEY_DESKTOP, VAL_SCRLLLINES, 3);
+#if (_WIN32_WINNT >= 0x0600)
+ gspv.iWheelScrollChars = SpiLoadInt(KEY_DESKTOP, VAL_SCRLLCHARS, 3);
+#endif
/* Some hardcoded values for now */
- gspv.iMouseHoverTime = 80;
- gspv.iMouseHoverWidth = 4;
- gspv.iMouseHoverHeight = 4;
- gspv.iWheelScrollLines = 3;
-#if (_WIN32_WINNT >= 0x0600)
- gspv.uiWheelScrollChars = 1;
-#endif
gspv.tmCaptionFont.tmAveCharWidth = 6;
gspv.bBeep = TRUE;
@@ -1083,13 +1090,13 @@
return SpiGetInt(pvParam, &gspv.iMouseTrails, fl);
case SPI_SETMOUSETRAILS:
- return SpiSetInt(&gspv.iMouseTrails, uiParam, KEY_MOUSE,
L"MouseTrails", fl);
+ return SpiSetInt(&gspv.iMouseTrails, uiParam, KEY_MOUSE, VAL_MOUSETRAILS,
fl);
case SPI_GETSNAPTODEFBUTTON:
return SpiGetInt(pvParam, &gspv.bSnapToDefBtn, fl);
case SPI_SETSNAPTODEFBUTTON:
- return SpiSetBool(&gspv.bSnapToDefBtn, uiParam, KEY_MOUSE,
L"SnapToDefaultButton", fl);
+ return SpiSetBool(&gspv.bSnapToDefBtn, uiParam, KEY_MOUSE,
VAL_SNAPDEFBTN, fl);
case SPI_GETMOUSEHOVERWIDTH:
return SpiGetInt(pvParam, &gspv.iMouseHoverWidth, fl);
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/winsta.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/winsta.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/winsta.c [iso-8859-1] Mon Oct 5 21:53:15
2009
@@ -538,23 +538,26 @@
CurInfo->CurrentCursorObject = NULL;
CurInfo->ShowingCursor = 0;
- /* FIXME: Obtain the following information from the registry */
-
-// CurInfo->WheelScroLines = 3;
-// CurInfo->WheelScroChars = 3;
- CurInfo->SwapButtons = FALSE;
- CurInfo->DblClickSpeed = 500;
- CurInfo->DblClickWidth = 4;
- CurInfo->DblClickHeight = 4;
-
-// CurInfo->MouseSpeed = 10;
-// CurInfo->CursorAccelerationInfo.FirstThreshold = 6;
-// CurInfo->CursorAccelerationInfo.SecondThreshold = 10;
-// CurInfo->CursorAccelerationInfo.Acceleration = 1;
-
-// CurInfo->MouseHoverTime = 80;
-// CurInfo->MouseHoverWidth = 4;
-// CurInfo->MouseHoverHeight = 4;
+/*
+ // not used anymore
+ CurInfo->WheelScroLines = gspv.iWheelScrollLines;
+#if (_WIN32_WINNT >= 0x0600)
+ CurInfo->WheelScroChars = gspv.iWheelScrollChars;
+#endif
+ CurInfo->SwapButtons = gspv.bMouseBtnSwap;
+ CurInfo->DblClickSpeed = gspv.iDblClickTime;
+ CurInfo->DblClickWidth = gspv.iDblClickWidth;
+ CurInfo->DblClickHeight = gspv.iDblClickHeight;
+
+ CurInfo->MouseSpeed = gspv.iMouseSpeed;
+ CurInfo->CursorAccelerationInfo.FirstThreshold = gspv.caiMouse.FirstThreshold;
+ CurInfo->CursorAccelerationInfo.SecondThreshold = gspv.caiMouse.SecondThreshold;
+ CurInfo->CursorAccelerationInfo.Acceleration = gspv.caiMouse.Acceleration;
+
+ CurInfo->MouseHoverTime = gspv.iMouseHoverTime;
+ CurInfo->MouseHoverWidth = gspv.iMouseHoverWidth;
+ CurInfo->MouseHoverHeight = gspv.iMouseHoverHeight;
+*/
// WindowStationObject->ScreenSaverActive = FALSE;
// WindowStationObject->ScreenSaverTimeOut = 10;