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
d3cc4dcd
Commit
d3cc4dcd
authored
Jan 10, 2005
by
Lauri Tulmin
Committed by
Alexandre Julliard
Jan 10, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes to the handling of LBS_EXTENDEDSEL style, with tests.
parent
63522122
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
3 deletions
+36
-3
listbox.c
dlls/user/listbox.c
+8
-3
listbox.c
dlls/user/tests/listbox.c
+28
-0
No files found.
dlls/user/listbox.c
View file @
d3cc4dcd
...
...
@@ -2010,11 +2010,16 @@ static LRESULT LISTBOX_HandleLButtonDown( LB_DESCR *descr, DWORD keys, INT x, IN
{
LISTBOX_MoveCaret
(
descr
,
index
,
FALSE
);
if
(
descr
->
style
&
LBS_
MULTIPLE
SEL
)
if
(
descr
->
style
&
LBS_
EXTENDED
SEL
)
{
LISTBOX_SetSelection
(
descr
,
index
,
(
!
(
descr
->
style
&
LBS_MULTIPLESEL
)
||
!
descr
->
items
[
index
].
selected
),
descr
->
items
[
index
].
selected
,
(
descr
->
style
&
LBS_NOTIFY
)
!=
0
);
}
else
{
LISTBOX_SetSelection
(
descr
,
index
,
!
descr
->
items
[
index
].
selected
,
(
descr
->
style
&
LBS_NOTIFY
)
!=
0
);
}
}
...
...
dlls/user/tests/listbox.c
View file @
d3cc4dcd
...
...
@@ -181,6 +181,26 @@ START_TEST(listbox)
{
LB_ERR
,
LB_ERR
,
0
,
LB_ERR
},
{
0
,
0
,
0
,
0
},
{
1
,
1
,
1
,
LB_ERR
},
{
0
,
0
,
0
,
0
},
{
2
,
2
,
2
,
LB_ERR
},
{
0
,
0
,
0
,
0
}};
const
struct
listbox_test
ES
=
{{
LBS_EXTENDEDSEL
},
{
0
,
LB_ERR
,
0
,
0
},
{
0
,
0
,
0
,
0
},
{
1
,
1
,
1
,
1
},
{
0
,
0
,
0
,
0
},
{
2
,
2
,
2
,
1
},
{
0
,
0
,
0
,
0
}};
const
struct
listbox_test
ES_NS
=
{{
LBS_EXTENDEDSEL
|
LBS_NOSEL
},
{
LB_ERR
,
LB_ERR
,
0
,
LB_ERR
},
{
0
,
0
,
0
,
0
},
{
1
,
1
,
1
,
LB_ERR
},
{
0
,
0
,
0
,
0
},
{
2
,
2
,
2
,
LB_ERR
},
{
0
,
0
,
0
,
0
}};
const
struct
listbox_test
EMS
=
{{
LBS_EXTENDEDSEL
|
LBS_MULTIPLESEL
},
{
0
,
LB_ERR
,
0
,
0
},
{
0
,
0
,
0
,
0
},
{
1
,
1
,
1
,
1
},
{
0
,
0
,
0
,
0
},
{
2
,
2
,
2
,
1
},
{
0
,
0
,
0
,
0
}};
const
struct
listbox_test
EMS_NS
=
{{
LBS_EXTENDEDSEL
|
LBS_MULTIPLESEL
|
LBS_NOSEL
},
{
LB_ERR
,
LB_ERR
,
0
,
LB_ERR
},
{
0
,
0
,
0
,
0
},
{
1
,
1
,
1
,
LB_ERR
},
{
0
,
0
,
0
,
0
},
{
2
,
2
,
2
,
LB_ERR
},
{
0
,
0
,
0
,
0
}};
trace
(
" Testing single selection...
\n
"
);
check
(
SS
);
...
...
@@ -190,6 +210,14 @@ START_TEST(listbox)
check
(
MS
);
trace
(
" ... with NOSEL
\n
"
);
check
(
MS_NS
);
trace
(
" Testing extended selection...
\n
"
);
check
(
ES
);
trace
(
" ... with NOSEL
\n
"
);
check
(
ES_NS
);
trace
(
" Testing extended and multiple selection...
\n
"
);
check
(
EMS
);
trace
(
" ... with NOSEL
\n
"
);
check
(
EMS_NS
);
check_item_height
();
}
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