Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
72a4df94
Commit
72a4df94
authored
Mar 14, 2005
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Mar 14, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not release capture before sending WM_NCDESTROY message, update the
tests to reflect that.
parent
20899f78
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
22 deletions
+42
-22
msg.c
dlls/user/tests/msg.c
+37
-3
win.c
dlls/user/tests/win.c
+5
-0
win.c
windows/win.c
+0
-19
No files found.
dlls/user/tests/msg.c
View file @
72a4df94
...
...
@@ -152,6 +152,7 @@ static const struct message WmSWP_ResizeSeq[] = {
{
WM_NCPAINT
,
sent
|
optional
},
{
WM_GETTEXT
,
sent
|
defwinproc
|
optional
},
{
WM_ERASEBKGND
,
sent
|
optional
},
{
EVENT_OBJECT_LOCATIONCHANGE
,
winevent_hook
|
wparam
|
lparam
,
0
,
0
},
{
0
}
};
...
...
@@ -170,6 +171,7 @@ static const struct message WmSWP_ResizePopupSeq[] = {
{
WM_NCPAINT
,
sent
|
optional
},
{
WM_GETTEXT
,
sent
|
defwinproc
|
optional
},
{
WM_ERASEBKGND
,
sent
|
optional
},
{
EVENT_OBJECT_LOCATIONCHANGE
,
winevent_hook
|
wparam
|
lparam
,
0
,
0
},
{
0
}
};
...
...
@@ -183,6 +185,7 @@ static const struct message WmSWP_MoveSeq[] = {
{
WM_ERASEBKGND
,
sent
|
optional
},
{
WM_WINDOWPOSCHANGED
,
sent
|
wparam
,
SWP_NOACTIVATE
|
SWP_NOSIZE
|
SWP_NOZORDER
|
SWP_NOCLIENTSIZE
},
{
WM_MOVE
,
sent
|
defwinproc
|
wparam
,
0
},
{
EVENT_OBJECT_LOCATIONCHANGE
,
winevent_hook
|
wparam
|
lparam
,
0
,
0
},
{
0
}
};
...
...
@@ -1029,6 +1032,7 @@ static const struct message WmSHOWNAChildVisParVis[] = {
static
const
struct
message
WmSHOWNAChildInvisParVis
[]
=
{
{
WM_SHOWWINDOW
,
sent
|
wparam
,
1
},
{
WM_WINDOWPOSCHANGING
,
sent
|
wparam
,
SWP_SHOWWINDOW
|
SWP_NOACTIVATE
|
SWP_NOSIZE
|
SWP_NOMOVE
|
SWP_NOZORDER
},
{
EVENT_OBJECT_SHOW
,
winevent_hook
|
wparam
|
lparam
,
0
,
0
},
{
WM_ERASEBKGND
,
sent
|
optional
},
{
WM_WINDOWPOSCHANGED
,
sent
|
wparam
,
SWP_SHOWWINDOW
|
SWP_NOSIZE
|
SWP_NOMOVE
|
SWP_NOCLIENTSIZE
|
SWP_NOACTIVATE
|
SWP_NOZORDER
|
SWP_NOCLIENTMOVE
},
{
0
}
...
...
@@ -1041,6 +1045,7 @@ static const struct message WmSHOWNATopVisible[] = {
static
const
struct
message
WmSHOWNATopInvisible
[]
=
{
{
WM_SHOWWINDOW
,
sent
|
wparam
,
1
},
{
WM_WINDOWPOSCHANGING
,
sent
|
wparam
,
SWP_SHOWWINDOW
|
SWP_NOACTIVATE
|
SWP_NOSIZE
|
SWP_NOMOVE
},
{
EVENT_OBJECT_SHOW
,
winevent_hook
|
wparam
|
lparam
,
0
,
0
},
{
WM_NCPAINT
,
sent
|
wparam
,
1
},
{
WM_GETICON
,
sent
|
optional
},
{
WM_GETICON
,
sent
|
optional
},
...
...
@@ -2835,7 +2840,11 @@ static void test_showwindow(void)
ok_sequence
(
WmSHOWNAChildInvisParVis
,
"ShowWindow(SW_SHOWNA) for the invisible child and visible parent"
,
FALSE
);
trace
(
"done
\n
"
);
SetCapture
(
hchild
);
ok
(
GetCapture
()
==
hchild
,
"wrong capture window %p
\n
"
,
GetCapture
());
DestroyWindow
(
hchild
);
ok
(
!
GetCapture
(),
"wrong capture window %p
\n
"
,
GetCapture
());
DestroyWindow
(
hwnd
);
flush_sequence
();
}
...
...
@@ -4374,9 +4383,32 @@ static LRESULT WINAPI MsgCheckProcA(HWND hwnd, UINT message, WPARAM wParam, LPAR
switch
(
message
)
{
case
WM_CAPTURECHANGED
:
if
(
test_DestroyWindow_flag
)
{
DWORD
style
=
GetWindowLongA
(
hwnd
,
GWL_STYLE
);
if
(
style
&
WS_CHILD
)
lParam
=
GetWindowLongA
(
hwnd
,
GWL_ID
);
else
if
(
style
&
WS_POPUP
)
lParam
=
WND_POPUP_ID
;
else
lParam
=
WND_PARENT_ID
;
}
break
;
case
WM_NCDESTROY
:
{
HWND
capture
;
ok
(
!
GetWindow
(
hwnd
,
GW_CHILD
),
"children should be unlinked at this point
\n
"
);
ok
(
GetCapture
()
!=
hwnd
,
"capture should be released at this point
\n
"
);
capture
=
GetCapture
();
if
(
capture
)
{
ok
(
capture
==
hwnd
,
"capture should NOT be released at this point (capture %p)
\n
"
,
capture
);
trace
(
"current capture %p, releasing...
\n
"
,
capture
);
ReleaseCapture
();
}
}
/* fall through */
case
WM_DESTROY
:
if
(
pGetAncestor
)
...
...
@@ -5445,10 +5477,12 @@ static void test_scrollwindowex(void)
}
static
const
struct
message
destroy_window_with_children
[]
=
{
{
EVENT_SYSTEM_CAPTURESTART
,
winevent_hook
|
wparam
|
lparam
,
0
,
0
},
/* popup */
{
HCBT_DESTROYWND
,
hook
|
lparam
,
0
,
WND_PARENT_ID
},
/* parent */
{
HCBT_DESTROYWND
,
hook
|
lparam
,
0
,
WND_POPUP_ID
},
/* popup */
{
EVENT_OBJECT_DESTROY
,
winevent_hook
|
wparam
|
lparam
,
0
,
0
},
/* popup */
{
WM_DESTROY
,
sent
|
wparam
|
lparam
,
0
,
WND_POPUP_ID
},
/* popup */
{
WM_CAPTURECHANGED
,
sent
|
wparam
|
lparam
,
0
,
WND_POPUP_ID
},
/* popup */
{
WM_NCDESTROY
,
sent
|
wparam
|
lparam
,
0
,
WND_POPUP_ID
},
/* popup */
{
EVENT_OBJECT_DESTROY
,
winevent_hook
|
wparam
|
lparam
,
0
,
0
},
/* parent */
{
WM_DESTROY
,
sent
|
wparam
|
lparam
,
0
,
WND_PARENT_ID
},
/* parent */
...
...
@@ -5559,9 +5593,9 @@ todo_wine {
trace
(
"parent %p, child1 %p, child2 %p, child3 %p, child4 %p
\n
"
,
parent
,
child1
,
child2
,
child3
,
child4
);
SetCapture
(
child
3
);
SetCapture
(
child
4
);
test
=
GetCapture
();
ok
(
test
==
child
3
,
"wrong capture window %p
\n
"
,
test
);
ok
(
test
==
child
4
,
"wrong capture window %p
\n
"
,
test
);
test_DestroyWindow_flag
=
TRUE
;
ok
(
DestroyWindow
(
parent
),
"DestroyWindow() error %ld
\n
"
,
GetLastError
());
...
...
dlls/user/tests/win.c
View file @
72a4df94
...
...
@@ -2043,7 +2043,12 @@ static void test_capture_1(void)
SendMessageA
(
button
,
WM_LBUTTONDOWN
,
0
,
0
);
capture
=
SetCapture
(
button
);
ok
(
capture
==
0
,
"SetCapture() = %p
\n
"
,
capture
);
check_wnd_state
(
button
,
0
,
button
,
button
);
DestroyWindow
(
button
);
check_wnd_state
(
0
,
0
,
0
,
0
);
}
static
void
test_capture_2
(
void
)
...
...
windows/win.c
View file @
72a4df94
...
...
@@ -614,23 +614,6 @@ BOOL WIN_GetRectangles( HWND hwnd, RECT *rectWindow, RECT *rectClient )
/***********************************************************************
* WIN_ReleaseCapture
*
* Internal version of ReleaseCapture which doesn't send WM_CAPTURECHANGED
* message. Used at the window destruction time.
*/
static
void
WIN_ReleaseCapture
(
void
)
{
SERVER_START_REQ
(
set_capture_window
)
{
req
->
handle
=
0
;
req
->
flags
=
0
;
wine_server_call_err
(
req
);
}
SERVER_END_REQ
;
}
/***********************************************************************
* WIN_DestroyWindow
*
* Destroy storage associated to a window. "Internals" p.358
...
...
@@ -667,8 +650,6 @@ LRESULT WIN_DestroyWindow( HWND hwnd )
RedrawWindow
(
hwnd
,
NULL
,
0
,
RDW_VALIDATE
|
RDW_NOFRAME
|
RDW_NOERASE
|
RDW_NOINTERNALPAINT
|
RDW_NOCHILDREN
);
if
(
hwnd
==
GetCapture
())
WIN_ReleaseCapture
();
/* Unlink now so we won't bother with the children later on */
WIN_UnlinkWindow
(
hwnd
);
...
...
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