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
a1cac2c3
Commit
a1cac2c3
authored
May 13, 2009
by
Nikolay Sivov
Committed by
Alexandre Julliard
May 13, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/listview: Don't check for state changes we are not aware to store (with some tests).
parent
afaa6d46
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
56 additions
and
2 deletions
+56
-2
listview.c
dlls/comctl32/listview.c
+4
-2
listview.c
dlls/comctl32/tests/listview.c
+52
-0
No files found.
dlls/comctl32/listview.c
View file @
a1cac2c3
...
@@ -3508,7 +3508,8 @@ static BOOL set_main_item(LISTVIEW_INFO *infoPtr, const LVITEMW *lpLVItem, BOOL
...
@@ -3508,7 +3508,8 @@ static BOOL set_main_item(LISTVIEW_INFO *infoPtr, const LVITEMW *lpLVItem, BOOL
item
.
iItem
=
lpLVItem
->
iItem
;
item
.
iItem
=
lpLVItem
->
iItem
;
item
.
iSubItem
=
lpLVItem
->
iSubItem
;
item
.
iSubItem
=
lpLVItem
->
iSubItem
;
item
.
mask
=
LVIF_STATE
|
LVIF_PARAM
;
item
.
mask
=
LVIF_STATE
|
LVIF_PARAM
;
item
.
stateMask
=
~
0
;
item
.
stateMask
=
(
infoPtr
->
dwStyle
&
LVS_OWNERDATA
)
?
LVIS_FOCUSED
|
LVIS_SELECTED
:
~
0
;
item
.
state
=
0
;
item
.
state
=
0
;
item
.
lParam
=
0
;
item
.
lParam
=
0
;
if
(
!
isNew
&&
!
LISTVIEW_GetItemW
(
infoPtr
,
&
item
))
return
FALSE
;
if
(
!
isNew
&&
!
LISTVIEW_GetItemW
(
infoPtr
,
&
item
))
return
FALSE
;
...
@@ -5553,7 +5554,8 @@ static BOOL LISTVIEW_GetItemT(const LISTVIEW_INFO *infoPtr, LPLVITEMW lpLVItem,
...
@@ -5553,7 +5554,8 @@ static BOOL LISTVIEW_GetItemT(const LISTVIEW_INFO *infoPtr, LPLVITEMW lpLVItem,
dispInfo
.
item
.
state
=
0
;
dispInfo
.
item
.
state
=
0
;
/* apparently, we should not callback for lParam in LVS_OWNERDATA */
/* apparently, we should not callback for lParam in LVS_OWNERDATA */
if
((
lpLVItem
->
mask
&
~
(
LVIF_STATE
|
LVIF_PARAM
))
||
infoPtr
->
uCallbackMask
)
if
((
lpLVItem
->
mask
&
~
(
LVIF_STATE
|
LVIF_PARAM
))
||
((
lpLVItem
->
mask
&
LVIF_STATE
)
&&
(
infoPtr
->
uCallbackMask
&
lpLVItem
->
stateMask
)))
{
{
UINT
mask
=
lpLVItem
->
mask
;
UINT
mask
=
lpLVItem
->
mask
;
...
...
dlls/comctl32/tests/listview.c
View file @
a1cac2c3
...
@@ -180,6 +180,11 @@ static const struct message textcallback_set_again_parent_seq[] = {
...
@@ -180,6 +180,11 @@ static const struct message textcallback_set_again_parent_seq[] = {
{
0
}
{
0
}
};
};
static
const
struct
message
single_getdispinfo_parent_seq
[]
=
{
{
WM_NOTIFY
,
sent
|
id
,
0
,
0
,
LVN_GETDISPINFOA
},
{
0
}
};
struct
subclass_info
struct
subclass_info
{
{
WNDPROC
oldproc
;
WNDPROC
oldproc
;
...
@@ -2045,6 +2050,53 @@ static void test_ownerdata(void)
...
@@ -2045,6 +2050,53 @@ static void test_ownerdata(void)
ok_sequence
(
sequences
,
PARENT_SEQ_INDEX
,
ownderdata_select_focus_parent_seq
,
ok_sequence
(
sequences
,
PARENT_SEQ_INDEX
,
ownderdata_select_focus_parent_seq
,
"ownerdata focus notification"
,
TRUE
);
"ownerdata focus notification"
,
TRUE
);
DestroyWindow
(
hwnd
);
DestroyWindow
(
hwnd
);
/* check notifications on LVM_GETITEM */
/* zero callback mask */
hwnd
=
create_listview_control
(
LVS_OWNERDATA
);
ok
(
hwnd
!=
NULL
,
"failed to create a listview window
\n
"
);
res
=
SendMessageA
(
hwnd
,
LVM_SETITEMCOUNT
,
1
,
0
);
ok
(
res
!=
0
,
"Expected LVM_SETITEMCOUNT to succeed
\n
"
);
flush_sequences
(
sequences
,
NUM_MSG_SEQUENCES
);
memset
(
&
item
,
0
,
sizeof
(
item
));
item
.
stateMask
=
LVIS_SELECTED
;
item
.
mask
=
LVIF_STATE
;
res
=
SendMessageA
(
hwnd
,
LVM_GETITEMA
,
0
,
(
LPARAM
)
&
item
);
expect
(
TRUE
,
res
);
ok_sequence
(
sequences
,
PARENT_SEQ_INDEX
,
empty_seq
,
"ownerdata getitem selected state 1"
,
FALSE
);
/* non zero callback mask but not we asking for */
res
=
SendMessageA
(
hwnd
,
LVM_SETCALLBACKMASK
,
LVIS_OVERLAYMASK
,
0
);
expect
(
TRUE
,
res
);
flush_sequences
(
sequences
,
NUM_MSG_SEQUENCES
);
memset
(
&
item
,
0
,
sizeof
(
item
));
item
.
stateMask
=
LVIS_SELECTED
;
item
.
mask
=
LVIF_STATE
;
res
=
SendMessageA
(
hwnd
,
LVM_GETITEMA
,
0
,
(
LPARAM
)
&
item
);
expect
(
TRUE
,
res
);
ok_sequence
(
sequences
,
PARENT_SEQ_INDEX
,
empty_seq
,
"ownerdata getitem selected state 2"
,
FALSE
);
/* LVIS_OVERLAYMASK callback mask, asking for index */
flush_sequences
(
sequences
,
NUM_MSG_SEQUENCES
);
memset
(
&
item
,
0
,
sizeof
(
item
));
item
.
stateMask
=
LVIS_OVERLAYMASK
;
item
.
mask
=
LVIF_STATE
;
res
=
SendMessageA
(
hwnd
,
LVM_GETITEMA
,
0
,
(
LPARAM
)
&
item
);
expect
(
TRUE
,
res
);
ok_sequence
(
sequences
,
PARENT_SEQ_INDEX
,
single_getdispinfo_parent_seq
,
"ownerdata getitem selected state 2"
,
FALSE
);
DestroyWindow
(
hwnd
);
}
}
static
void
test_norecompute
(
void
)
static
void
test_norecompute
(
void
)
...
...
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