Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
dfdb64c1
Commit
dfdb64c1
authored
May 27, 2008
by
Vitaly Lipatov
Committed by
Alexandre Julliard
Jun 26, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Implemented processing SPI_{GET/SET}SNAPTODEFBUTTON for SystemParametersInfo.
parent
f16e49ba
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
2 deletions
+55
-2
sysparams.c
dlls/user32/sysparams.c
+18
-2
sysparams.c
dlls/user32/tests/sysparams.c
+37
-0
No files found.
dlls/user32/sysparams.c
View file @
dfdb64c1
...
...
@@ -77,6 +77,7 @@ enum spi_index
SPI_SETMENUSHOWDELAY_IDX
,
SPI_SETICONTITLELOGFONT_IDX
,
SPI_SETLOWPOWERACTIVE_IDX
,
SPI_SETSNAPTODEFBUTTON_IDX
,
SPI_SETPOWEROFFACTIVE_IDX
,
SPI_USERPREFERENCEMASK_IDX
,
SPI_NONCLIENTMETRICS_IDX
,
...
...
@@ -166,6 +167,8 @@ static const WCHAR SPI_SETMENUDROPALIGNMENT_REGKEY1[]= {'S','o','f','t','
'W'
,
'i'
,
'n'
,
'd'
,
'o'
,
'w'
,
's'
,
0
};
static
const
WCHAR
SPI_SETMENUDROPALIGNMENT_REGKEY2
[]
=
{
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
' '
,
'P'
,
'a'
,
'n'
,
'e'
,
'l'
,
'\\'
,
'D'
,
'e'
,
's'
,
'k'
,
't'
,
'o'
,
'p'
,
0
};
static
const
WCHAR
SPI_SETMENUDROPALIGNMENT_VALNAME
[]
=
{
'M'
,
'e'
,
'n'
,
'u'
,
'D'
,
'r'
,
'o'
,
'p'
,
'A'
,
'l'
,
'i'
,
'g'
,
'n'
,
'm'
,
'e'
,
'n'
,
't'
,
0
};
static
const
WCHAR
SPI_SETSNAPTODEFBUTTON_REGKEY
[]
=
{
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
' '
,
'P'
,
'a'
,
'n'
,
'e'
,
'l'
,
'\\'
,
'M'
,
'o'
,
'u'
,
's'
,
'e'
,
0
};
static
const
WCHAR
SPI_SETSNAPTODEFBUTTON_VALNAME
[]
=
{
'S'
,
'n'
,
'a'
,
'p'
,
'T'
,
'o'
,
'D'
,
'e'
,
'f'
,
'a'
,
'u'
,
'l'
,
't'
,
'B'
,
'u'
,
't'
,
't'
,
'o'
,
'n'
,
0
};
static
const
WCHAR
SPI_SETDOUBLECLKWIDTH_REGKEY1
[]
=
{
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
' '
,
'P'
,
'a'
,
'n'
,
'e'
,
'l'
,
'\\'
,
'M'
,
'o'
,
'u'
,
's'
,
'e'
,
0
};
static
const
WCHAR
SPI_SETDOUBLECLKWIDTH_REGKEY2
[]
=
{
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
' '
,
'P'
,
'a'
,
'n'
,
'e'
,
'l'
,
'\\'
,
'D'
,
'e'
,
's'
,
'k'
,
't'
,
'o'
,
'p'
,
0
};
static
const
WCHAR
SPI_SETDOUBLECLKWIDTH_VALNAME
[]
=
{
'D'
,
'o'
,
'u'
,
'b'
,
'l'
,
'e'
,
'C'
,
'l'
,
'i'
,
'c'
,
'k'
,
'W'
,
'i'
,
'd'
,
't'
,
'h'
,
0
};
...
...
@@ -298,6 +301,7 @@ static UINT font_smoothing = 0; /* 0x01 for 95/98/NT, 0x02 for 98/ME/2k/XP */
static
BOOL
lowpoweractive
=
FALSE
;
static
BOOL
poweroffactive
=
FALSE
;
static
BOOL
show_sounds
=
FALSE
;
static
BOOL
snap_to_default_button
=
FALSE
;
static
BOOL
swap_buttons
=
FALSE
;
static
UINT
caret_width
=
1
;
static
BYTE
user_prefs
[
4
];
...
...
@@ -2016,8 +2020,20 @@ BOOL WINAPI SystemParametersInfoW( UINT uiAction, UINT uiParam,
WINE_SPI_FIXME
(
SPI_SETMOUSETRAILS
);
/* 93 WINVER >= 0x400 */
WINE_SPI_FIXME
(
SPI_GETMOUSETRAILS
);
/* 94 WINVER >= 0x400 */
WINE_SPI_FIXME
(
SPI_GETSNAPTODEFBUTTON
);
/* 95 WINVER >= 0x400 */
WINE_SPI_FIXME
(
SPI_SETSNAPTODEFBUTTON
);
/* 96 WINVER >= 0x400 */
case
SPI_GETSNAPTODEFBUTTON
:
/* 95 WINVER >= 0x400 */
ret
=
get_bool_param
(
SPI_SETSNAPTODEFBUTTON_IDX
,
SPI_SETSNAPTODEFBUTTON_REGKEY
,
SPI_SETSNAPTODEFBUTTON_VALNAME
,
&
snap_to_default_button
,
pvParam
);
break
;
case
SPI_SETSNAPTODEFBUTTON
:
/* 96 WINVER >= 0x400 */
ret
=
set_bool_param
(
SPI_SETSNAPTODEFBUTTON_IDX
,
SPI_SETSNAPTODEFBUTTON_REGKEY
,
SPI_SETSNAPTODEFBUTTON_VALNAME
,
&
snap_to_default_button
,
uiParam
,
fWinIni
);
break
;
case
SPI_SETSCREENSAVERRUNNING
:
ret
=
set_bool_param
(
SPI_SETSCREENSAVERRUNNING_IDX
,
...
...
dlls/user32/tests/sysparams.c
View file @
dfdb64c1
...
...
@@ -129,6 +129,8 @@ static HDC hdc;
#define SPI_SETPOWEROFFACTIVE_VALNAME "PowerOffActive"
#define SPI_SETDRAGFULLWINDOWS_REGKEY "Control Panel\\Desktop"
#define SPI_SETDRAGFULLWINDOWS_VALNAME "DragFullWindows"
#define SPI_SETSNAPTODEFBUTTON_REGKEY "Control Panel\\Mouse"
#define SPI_SETSNAPTODEFBUTTON_VALNAME "SnapToDefaultButton"
#define SPI_SETMOUSEHOVERWIDTH_REGKEY "Control Panel\\Mouse"
#define SPI_SETMOUSEHOVERWIDTH_VALNAME "MouseHoverWidth"
#define SPI_SETMOUSEHOVERHEIGHT_REGKEY "Control Panel\\Mouse"
...
...
@@ -1966,6 +1968,40 @@ static void test_SPI_SETPOWEROFFACTIVE( void ) /* 86 */
ok
(
rc
!=
0
,
"***warning*** failed to restore the original value: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
}
static
void
test_SPI_SETSNAPTODEFBUTTON
(
void
)
/* 95 */
{
BOOL
rc
;
BOOL
old_b
;
const
UINT
vals
[]
=
{
TRUE
,
FALSE
};
unsigned
int
i
;
trace
(
"testing SPI_{GET,SET}SNAPTODEFBUTTON
\n
"
);
SetLastError
(
0xdeadbeef
);
rc
=
SystemParametersInfoA
(
SPI_GETSNAPTODEFBUTTON
,
0
,
&
old_b
,
0
);
if
(
!
test_error_msg
(
rc
,
"SPI_GETSNAPTODEFBUTTON"
))
return
;
for
(
i
=
0
;
i
<
sizeof
(
vals
)
/
sizeof
(
*
vals
);
i
++
)
{
UINT
v
;
rc
=
SystemParametersInfoA
(
SPI_SETSNAPTODEFBUTTON
,
vals
[
i
],
0
,
SPIF_UPDATEINIFILE
|
SPIF_SENDCHANGE
);
ok
(
rc
!=
0
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
test_change_message
(
SPI_SETSNAPTODEFBUTTON
,
0
);
test_reg_key
(
SPI_SETSNAPTODEFBUTTON_REGKEY
,
SPI_SETSNAPTODEFBUTTON_VALNAME
,
vals
[
i
]
?
"1"
:
"0"
);
rc
=
SystemParametersInfoA
(
SPI_GETSNAPTODEFBUTTON
,
0
,
&
v
,
0
);
ok
(
rc
!=
0
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
eq
(
v
,
vals
[
i
],
"SPI_GETSNAPTODEFBUTTON"
,
"%d"
);
}
rc
=
SystemParametersInfoA
(
SPI_SETSNAPTODEFBUTTON
,
old_b
,
0
,
SPIF_UPDATEINIFILE
);
ok
(
rc
!=
0
,
"***warning*** failed to restore the original value: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
}
static
void
test_SPI_SETMOUSEHOVERWIDTH
(
void
)
/* 99 */
{
BOOL
rc
;
...
...
@@ -2300,6 +2336,7 @@ static DWORD WINAPI SysParamsThreadFunc( LPVOID lpParam )
test_SPI_SETFONTSMOOTHING
();
/* 75 */
test_SPI_SETLOWPOWERACTIVE
();
/* 85 */
test_SPI_SETPOWEROFFACTIVE
();
/* 86 */
test_SPI_SETSNAPTODEFBUTTON
();
/* 95 */
test_SPI_SETMOUSEHOVERWIDTH
();
/* 99 */
test_SPI_SETMOUSEHOVERHEIGHT
();
/* 101 */
test_SPI_SETMOUSEHOVERTIME
();
/* 103 */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment