Author: dchapyshev
Date: Sat Sep 10 18:39:40 2016
New Revision: 72648
URL:
http://svn.reactos.org/svn/reactos?rev=72648&view=rev
Log:
[NtUser] Fix 3 new tests for GET/SET NONCLIENTMETRICS, MINIMIZEDMETRICS, ICONMETRICS
Modified:
trunk/reactos/win32ss/user/ntuser/sysparams.c
Modified: trunk/reactos/win32ss/user/ntuser/sysparams.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/syspar…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/sysparams.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/sysparams.c [iso-8859-1] Sat Sep 10 18:39:40 2016
@@ -912,7 +912,12 @@
case SPI_SETNONCLIENTMETRICS:
{
- if (!SpiSet(&gspv.ncm, pvParam, sizeof(NONCLIENTMETRICSW), fl))
+ LPNONCLIENTMETRICSW metrics = (LPNONCLIENTMETRICSW)pvParam;
+
+ /* Fixup user's structure size */
+ metrics->cbSize = sizeof(NONCLIENTMETRICSW);
+
+ if (!SpiSet(&gspv.ncm, metrics, sizeof(NONCLIENTMETRICSW), fl))
return 0;
if (fl & SPIF_UPDATEINIFILE)
@@ -949,7 +954,12 @@
case SPI_SETMINIMIZEDMETRICS:
{
- if (!SpiSet(&gspv.mm, pvParam, sizeof(MINIMIZEDMETRICS), fl))
+ LPMINIMIZEDMETRICS metrics = (LPMINIMIZEDMETRICS)pvParam;
+
+ /* Fixup user's structure size */
+ metrics->cbSize = sizeof(MINIMIZEDMETRICS);
+
+ if (!SpiSet(&gspv.mm, metrics, sizeof(MINIMIZEDMETRICS), fl))
return 0;
gspv.mm.iWidth = max(0, gspv.mm.iWidth);
@@ -975,7 +985,12 @@
case SPI_SETICONMETRICS:
{
- if (!SpiSet(&gspv.im, pvParam, sizeof(ICONMETRICSW), fl))
+ LPICONMETRICSW metrics = (LPICONMETRICSW)pvParam;
+
+ /* Fixup user's structure size */
+ metrics->cbSize = sizeof(ICONMETRICSW);
+
+ if (!SpiSet(&gspv.im, metrics, sizeof(ICONMETRICSW), fl))
return 0;
if (fl & SPIF_UPDATEINIFILE)