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
aa5762d5
Commit
aa5762d5
authored
Feb 24, 2016
by
Jacek Caban
Committed by
Alexandre Julliard
Feb 27, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Ignore WM_CHILDACTIVATE on disabled windows in DefMDIChildProc.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
142133ae
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
68 additions
and
7 deletions
+68
-7
mdi.c
dlls/user32/mdi.c
+2
-1
msg.c
dlls/user32/tests/msg.c
+66
-0
win.c
dlls/user32/tests/win.c
+0
-6
No files found.
dlls/user32/mdi.c
View file @
aa5762d5
...
...
@@ -1485,7 +1485,8 @@ LRESULT WINAPI DefMDIChildProcW( HWND hwnd, UINT message,
break
;
case
WM_CHILDACTIVATE
:
MDI_ChildActivate
(
client
,
hwnd
);
if
(
IsWindowEnabled
(
hwnd
))
MDI_ChildActivate
(
client
,
hwnd
);
return
0
;
case
WM_SYSCOMMAND
:
...
...
dlls/user32/tests/msg.c
View file @
aa5762d5
...
...
@@ -2343,6 +2343,28 @@ static const struct message WmCreateMDIchildVisibleSeq[] = {
{
WM_MDIACTIVATE
,
sent
|
defwinproc
},
{
0
}
};
/* WM_CHILDACTIVATE sent to disabled window */
static
const
struct
message
WmChildActivateDisabledWindowSeq
[]
=
{
{
WM_CHILDACTIVATE
,
sent
|
wparam
|
lparam
,
0
,
0
},
{
0
}
};
/* WM_CHILDACTIVATE sent to enabled window */
static
const
struct
message
WmChildActivateWindowSeq
[]
=
{
{
WM_CHILDACTIVATE
,
sent
|
wparam
|
lparam
,
0
,
0
},
{
WM_NCACTIVATE
,
sent
|
wparam
|
defwinproc
,
0
},
{
WM_MDIACTIVATE
,
sent
|
defwinproc
},
{
WM_WINDOWPOSCHANGING
,
sent
|
wparam
|
defwinproc
,
SWP_NOACTIVATE
|
SWP_NOSIZE
|
SWP_NOMOVE
},
{
WM_WINDOWPOSCHANGED
,
sent
|
wparam
|
defwinproc
,
SWP_NOACTIVATE
|
SWP_NOSIZE
|
SWP_NOMOVE
|
SWP_NOCLIENTSIZE
|
SWP_NOCLIENTMOVE
},
{
WM_NCACTIVATE
,
sent
|
wparam
|
defwinproc
,
1
},
{
HCBT_SETFOCUS
,
hook
},
{
WM_KILLFOCUS
,
sent
|
defwinproc
},
{
WM_SETFOCUS
,
sent
},
{
HCBT_SETFOCUS
,
hook
},
{
WM_KILLFOCUS
,
sent
},
{
WM_SETFOCUS
,
sent
|
defwinproc
},
{
WM_MDIACTIVATE
,
sent
|
defwinproc
},
{
0
}
};
/* CreateWindow for MDI child window with invisible parent */
static
const
struct
message
WmCreateMDIchildInvisibleParentSeq
[]
=
{
{
HCBT_CREATEWND
,
hook
},
...
...
@@ -3618,6 +3640,50 @@ static void test_mdi_messages(void)
ok
(
GetActiveWindow
()
==
mdi_frame
,
"wrong active window %p
\n
"
,
GetActiveWindow
());
ok
(
GetFocus
()
==
0
,
"wrong focus window %p
\n
"
,
GetFocus
());
trace
(
"Testing WM_CHILDACTIVATE
\n
"
);
mdi_child
=
CreateWindowExA
(
WS_EX_MDICHILD
,
"MDI_child_class"
,
"MDI child"
,
WS_CHILD
|
WS_VISIBLE
|
WS_MAXIMIZEBOX
|
WS_DISABLED
,
0
,
0
,
CW_USEDEFAULT
,
CW_USEDEFAULT
,
mdi_client
,
0
,
GetModuleHandleA
(
0
),
NULL
);
mdi_child2
=
CreateWindowExA
(
WS_EX_MDICHILD
,
"MDI_child_class"
,
"MDI child"
,
WS_CHILD
|
WS_VISIBLE
|
WS_MAXIMIZEBOX
,
0
,
0
,
CW_USEDEFAULT
,
CW_USEDEFAULT
,
mdi_client
,
0
,
GetModuleHandleA
(
0
),
NULL
);
active_child
=
(
HWND
)
SendMessageA
(
mdi_client
,
WM_MDIGETACTIVE
,
0
,
(
LPARAM
)
&
zoomed
);
ok
(
active_child
==
mdi_child2
,
"wrong active MDI child %p
\n
"
,
active_child
);
ok
(
!
zoomed
,
"wrong zoomed state %d
\n
"
,
zoomed
);
flush_sequence
();
SendMessageW
(
mdi_child
,
WM_CHILDACTIVATE
,
0
,
0
);
ok_sequence
(
WmChildActivateDisabledWindowSeq
,
"WM_CHILDACTIVATE sent to disabled window"
,
FALSE
);
active_child
=
(
HWND
)
SendMessageA
(
mdi_client
,
WM_MDIGETACTIVE
,
0
,
(
LPARAM
)
&
zoomed
);
ok
(
active_child
==
mdi_child2
,
"wrong active MDI child %p
\n
"
,
active_child
);
ok
(
!
zoomed
,
"wrong zoomed state %d
\n
"
,
zoomed
);
flush_sequence
();
EnableWindow
(
mdi_child
,
TRUE
);
active_child
=
(
HWND
)
SendMessageA
(
mdi_client
,
WM_MDIGETACTIVE
,
0
,
(
LPARAM
)
&
zoomed
);
ok
(
active_child
==
mdi_child2
,
"wrong active MDI child %p
\n
"
,
active_child
);
ok
(
!
zoomed
,
"wrong zoomed state %d
\n
"
,
zoomed
);
flush_sequence
();
SendMessageW
(
mdi_child
,
WM_CHILDACTIVATE
,
0
,
0
);
ok_sequence
(
WmChildActivateWindowSeq
,
"WM_CHILDACTIVATE sent to enabled window"
,
FALSE
);
active_child
=
(
HWND
)
SendMessageA
(
mdi_client
,
WM_MDIGETACTIVE
,
0
,
(
LPARAM
)
&
zoomed
);
ok
(
active_child
==
mdi_child
,
"wrong active MDI child %p
\n
"
,
active_child
);
ok
(
!
zoomed
,
"wrong zoomed state %d
\n
"
,
zoomed
);
flush_sequence
();
DestroyWindow
(
mdi_child
);
DestroyWindow
(
mdi_child2
);
flush_sequence
();
/* test for maximized MDI children */
trace
(
"creating maximized visible MDI child window 1
\n
"
);
mdi_child
=
CreateWindowExA
(
WS_EX_MDICHILD
,
"MDI_child_class"
,
"MDI child"
,
...
...
dlls/user32/tests/win.c
View file @
aa5762d5
...
...
@@ -1411,7 +1411,6 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT_PTR first_id)
id
=
GetWindowLongPtrA
(
mdi_child
,
GWLP_ID
);
ok
(
id
==
first_id
,
"wrong child id %ld
\n
"
,
id
);
hwnd
=
(
HWND
)
SendMessageA
(
mdi_client
,
WM_MDIGETACTIVE
,
0
,
0
);
todo_wine
ok
(
!
hwnd
,
"WM_MDIGETACTIVE should return 0, got %p
\n
"
,
hwnd
);
SendMessageA
(
mdi_client
,
WM_MDIDESTROY
,
(
WPARAM
)
mdi_child
,
0
);
ok
(
!
IsWindow
(
mdi_child
),
"WM_MDIDESTROY failed
\n
"
);
...
...
@@ -1428,7 +1427,6 @@ todo_wine
id
=
GetWindowLongPtrA
(
mdi_child
,
GWLP_ID
);
ok
(
id
==
first_id
,
"wrong child id %ld
\n
"
,
id
);
hwnd
=
(
HWND
)
SendMessageA
(
mdi_client
,
WM_MDIGETACTIVE
,
0
,
0
);
todo_wine
ok
(
!
hwnd
,
"WM_MDIGETACTIVE should return 0, got %p
\n
"
,
hwnd
);
SendMessageA
(
mdi_client
,
WM_MDIDESTROY
,
(
WPARAM
)
mdi_child
,
0
);
ok
(
!
IsWindow
(
mdi_child
),
"WM_MDIDESTROY failed
\n
"
);
...
...
@@ -1484,7 +1482,6 @@ todo_wine
id
=
GetWindowLongPtrA
(
mdi_child
,
GWLP_ID
);
ok
(
id
==
first_id
,
"wrong child id %ld
\n
"
,
id
);
hwnd
=
(
HWND
)
SendMessageA
(
mdi_client
,
WM_MDIGETACTIVE
,
0
,
0
);
todo_wine
ok
(
!
hwnd
,
"WM_MDIGETACTIVE should return 0, got %p
\n
"
,
hwnd
);
SendMessageA
(
mdi_client
,
WM_MDIDESTROY
,
(
WPARAM
)
mdi_child
,
0
);
ok
(
!
IsWindow
(
mdi_child
),
"WM_MDIDESTROY failed
\n
"
);
...
...
@@ -1505,7 +1502,6 @@ todo_wine
id
=
GetWindowLongPtrA
(
mdi_child
,
GWLP_ID
);
ok
(
id
==
first_id
,
"wrong child id %ld
\n
"
,
id
);
hwnd
=
(
HWND
)
SendMessageA
(
mdi_client
,
WM_MDIGETACTIVE
,
0
,
0
);
todo_wine
ok
(
!
hwnd
,
"WM_MDIGETACTIVE should return 0, got %p
\n
"
,
hwnd
);
SendMessageA
(
mdi_client
,
WM_MDIDESTROY
,
(
WPARAM
)
mdi_child
,
0
);
ok
(
!
IsWindow
(
mdi_child
),
"WM_MDIDESTROY failed
\n
"
);
...
...
@@ -1562,7 +1558,6 @@ todo_wine
id
=
GetWindowLongPtrA
(
mdi_child
,
GWLP_ID
);
ok
(
id
==
first_id
,
"wrong child id %ld
\n
"
,
id
);
hwnd
=
(
HWND
)
SendMessageA
(
mdi_client
,
WM_MDIGETACTIVE
,
0
,
0
);
todo_wine
ok
(
!
hwnd
,
"WM_MDIGETACTIVE should return 0, got %p
\n
"
,
hwnd
);
SendMessageA
(
mdi_client
,
WM_MDIDESTROY
,
(
WPARAM
)
mdi_child
,
0
);
ok
(
!
IsWindow
(
mdi_child
),
"WM_MDIDESTROY failed
\n
"
);
...
...
@@ -1583,7 +1578,6 @@ todo_wine
id
=
GetWindowLongPtrA
(
mdi_child
,
GWLP_ID
);
ok
(
id
==
first_id
,
"wrong child id %ld
\n
"
,
id
);
hwnd
=
(
HWND
)
SendMessageA
(
mdi_client
,
WM_MDIGETACTIVE
,
0
,
0
);
todo_wine
ok
(
!
hwnd
,
"WM_MDIGETACTIVE should return 0, got %p
\n
"
,
hwnd
);
SendMessageA
(
mdi_client
,
WM_MDIDESTROY
,
(
WPARAM
)
mdi_child
,
0
);
ok
(
!
IsWindow
(
mdi_child
),
"WM_MDIDESTROY failed
\n
"
);
...
...
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