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
81d81354
Commit
81d81354
authored
Jan 13, 2010
by
Jason Edmeades
Committed by
Alexandre Julliard
Jan 14, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/listview: Issue LVM_DELETEALLITEMS from WM_DESTROY.
parent
44ab484a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
5 deletions
+34
-5
listview.c
dlls/comctl32/listview.c
+5
-4
listview.c
dlls/comctl32/tests/listview.c
+29
-1
No files found.
dlls/comctl32/listview.c
View file @
81d81354
...
...
@@ -9188,10 +9188,14 @@ static LRESULT LISTVIEW_Create(HWND hwnd, const CREATESTRUCTW *lpcs)
* Success: 0
* Failure: -1
*/
static
LRESULT
LISTVIEW_Destroy
(
const
LISTVIEW_INFO
*
infoPtr
)
static
LRESULT
LISTVIEW_Destroy
(
LISTVIEW_INFO
*
infoPtr
)
{
HTHEME
theme
=
GetWindowTheme
(
infoPtr
->
hwndSelf
);
CloseThemeData
(
theme
);
/* delete all items */
LISTVIEW_DeleteAllItems
(
infoPtr
,
TRUE
);
return
0
;
}
...
...
@@ -9923,9 +9927,6 @@ static LRESULT LISTVIEW_NCDestroy(LISTVIEW_INFO *infoPtr)
TRACE
(
"()
\n
"
);
/* delete all items */
LISTVIEW_DeleteAllItems
(
infoPtr
,
TRUE
);
/* destroy data structure */
DPA_Destroy
(
infoPtr
->
hdpaItems
);
DPA_Destroy
(
infoPtr
->
hdpaItemIds
);
...
...
dlls/comctl32/tests/listview.c
View file @
81d81354
...
...
@@ -32,7 +32,8 @@
#define PARENT_FULL_SEQ_INDEX 1
#define LISTVIEW_SEQ_INDEX 2
#define EDITBOX_SEQ_INDEX 3
#define NUM_MSG_SEQUENCES 4
#define COMBINED_SEQ_INDEX 4
#define NUM_MSG_SEQUENCES 5
#define LISTVIEW_ID 0
#define HEADER_ID 1
...
...
@@ -286,6 +287,18 @@ static const struct message hover_parent[] = {
{
0
}
};
static
const
struct
message
listview_destroy
[]
=
{
{
0x0090
,
sent
|
optional
},
/* Vista */
{
WM_PARENTNOTIFY
,
sent
},
{
WM_SHOWWINDOW
,
sent
},
{
WM_WINDOWPOSCHANGING
,
sent
},
{
WM_WINDOWPOSCHANGED
,
sent
|
optional
},
{
WM_DESTROY
,
sent
},
{
WM_NOTIFY
,
sent
|
id
,
0
,
0
,
LVN_DELETEALLITEMS
},
{
WM_NCDESTROY
,
sent
},
{
0
}
};
static
LRESULT
WINAPI
parent_wnd_proc
(
HWND
hwnd
,
UINT
message
,
WPARAM
wParam
,
LPARAM
lParam
)
{
static
LONG
defwndproc_counter
=
0
;
...
...
@@ -312,6 +325,7 @@ static LRESULT WINAPI parent_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LP
trace
(
"parent: %p, %04x, %08lx, %08lx
\n
"
,
hwnd
,
message
,
wParam
,
lParam
);
add_message
(
sequences
,
PARENT_SEQ_INDEX
,
&
msg
);
add_message
(
sequences
,
COMBINED_SEQ_INDEX
,
&
msg
);
}
add_message
(
sequences
,
PARENT_FULL_SEQ_INDEX
,
&
msg
);
...
...
@@ -460,6 +474,7 @@ static LRESULT WINAPI listview_subclass_proc(HWND hwnd, UINT message, WPARAM wPa
msg
.
lParam
=
lParam
;
msg
.
id
=
LISTVIEW_ID
;
add_message
(
sequences
,
LISTVIEW_SEQ_INDEX
,
&
msg
);
add_message
(
sequences
,
COMBINED_SEQ_INDEX
,
&
msg
);
defwndproc_counter
++
;
ret
=
CallWindowProcA
(
oldproc
,
hwnd
,
message
,
wParam
,
lParam
);
...
...
@@ -4263,6 +4278,18 @@ static void test_hover(void)
DestroyWindow
(
hwnd
);
}
static
void
test_destroynotify
(
void
)
{
HWND
hwnd
;
hwnd
=
create_listview_control
(
LVS_REPORT
);
ok
(
hwnd
!=
NULL
,
"failed to create listview window
\n
"
);
flush_sequences
(
sequences
,
NUM_MSG_SEQUENCES
);
DestroyWindow
(
hwnd
);
ok_sequence
(
sequences
,
COMBINED_SEQ_INDEX
,
listview_destroy
,
"check destroy order"
,
FALSE
);
}
START_TEST
(
listview
)
{
HMODULE
hComctl32
;
...
...
@@ -4323,6 +4350,7 @@ START_TEST(listview)
test_approximate_viewrect
();
test_finditem
();
test_hover
();
test_destroynotify
();
if
(
!
load_v6_module
(
&
ctx_cookie
,
&
hCtx
))
{
...
...
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