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
12f49fb9
Commit
12f49fb9
authored
Dec 06, 2004
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Dec 06, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ShowWindow activates only a being maximized child window, add a couple
of message tests for MDI child activation.
parent
193c83f6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
5 deletions
+47
-5
msg.c
dlls/user/tests/msg.c
+41
-0
winpos.c
dlls/x11drv/winpos.c
+6
-5
No files found.
dlls/user/tests/msg.c
View file @
12f49fb9
...
...
@@ -1778,6 +1778,47 @@ static void test_mdi_messages(void)
SetFocus
(
0
);
flush_sequence
();
trace
(
"creating invisible MDI child window
\n
"
);
mdi_child
=
CreateWindowExA
(
WS_EX_MDICHILD
,
"MDI_child_class"
,
"MDI child"
,
WS_CHILD
,
0
,
0
,
CW_USEDEFAULT
,
CW_USEDEFAULT
,
mdi_client
,
0
,
GetModuleHandleA
(
0
),
NULL
);
assert
(
mdi_child
);
flush_sequence
();
ShowWindow
(
mdi_child
,
SW_SHOWNORMAL
);
ok_sequence
(
WmShowChildSeq
,
"ShowWindow(SW_SHOWNORMAL) MDI child window"
,
FALSE
);
ok
(
GetWindowLongA
(
mdi_child
,
GWL_STYLE
)
&
WS_VISIBLE
,
"MDI child should be visible
\n
"
);
ok
(
IsWindowVisible
(
mdi_child
),
"MDI child should be visible
\n
"
);
ok
(
GetActiveWindow
()
==
mdi_frame
,
"wrong active window %p
\n
"
,
GetActiveWindow
());
ok
(
GetFocus
()
==
0
,
"wrong focus window %p
\n
"
,
GetFocus
());
active_child
=
(
HWND
)
SendMessageA
(
mdi_client
,
WM_MDIGETACTIVE
,
0
,
(
LPARAM
)
&
zoomed
);
ok
(
!
active_child
,
"wrong active MDI child %p
\n
"
,
active_child
);
ok
(
!
zoomed
,
"wrong zoomed state %d
\n
"
,
zoomed
);
ShowWindow
(
mdi_child
,
SW_HIDE
);
ok_sequence
(
WmHideChildSeq
,
"ShowWindow(SW_HIDE) MDI child window"
,
FALSE
);
flush_sequence
();
ShowWindow
(
mdi_child
,
SW_SHOW
);
ok_sequence
(
WmShowChildSeq
,
"ShowWindow(SW_SHOW) MDI child window"
,
FALSE
);
ok
(
GetWindowLongA
(
mdi_child
,
GWL_STYLE
)
&
WS_VISIBLE
,
"MDI child should be visible
\n
"
);
ok
(
IsWindowVisible
(
mdi_child
),
"MDI child should be visible
\n
"
);
ok
(
GetActiveWindow
()
==
mdi_frame
,
"wrong active window %p
\n
"
,
GetActiveWindow
());
ok
(
GetFocus
()
==
0
,
"wrong focus window %p
\n
"
,
GetFocus
());
active_child
=
(
HWND
)
SendMessageA
(
mdi_client
,
WM_MDIGETACTIVE
,
0
,
(
LPARAM
)
&
zoomed
);
ok
(
!
active_child
,
"wrong active MDI child %p
\n
"
,
active_child
);
ok
(
!
zoomed
,
"wrong zoomed state %d
\n
"
,
zoomed
);
DestroyWindow
(
mdi_child
);
flush_sequence
();
trace
(
"creating visible MDI child window
\n
"
);
mdi_child
=
CreateWindowExA
(
WS_EX_MDICHILD
,
"MDI_child_class"
,
"MDI child"
,
WS_CHILD
|
WS_VISIBLE
,
...
...
dlls/x11drv/winpos.c
View file @
12f49fb9
...
...
@@ -1288,13 +1288,15 @@ BOOL X11DRV_ShowWindow( HWND hwnd, INT cmd )
swp
|=
SWP_SHOWWINDOW
|
SWP_NOSIZE
|
SWP_NOMOVE
;
break
;
case
SW_RESTORE
:
swp
|=
SWP_FRAMECHANGED
;
/* fall through */
case
SW_SHOWNOACTIVATE
:
swp
|=
SWP_NOACTIVATE
|
SWP_NOZORDER
;
/* fall through */
case
SW_SHOWNORMAL
:
/* same as SW_NORMAL: */
case
SW_SHOWDEFAULT
:
/* FIXME: should have its own handler */
case
SW_RESTORE
:
swp
|=
SWP_SHOWWINDOW
|
SWP_FRAMECHANGED
;
swp
|=
SWP_SHOWWINDOW
;
if
(
wndPtr
->
dwStyle
&
(
WS_MINIMIZE
|
WS_MAXIMIZE
)
)
swp
|=
WINPOS_MinMaximize
(
hwnd
,
SW_RESTORE
,
&
newPos
);
...
...
@@ -1309,9 +1311,8 @@ BOOL X11DRV_ShowWindow( HWND hwnd, INT cmd )
if
(
!
IsWindow
(
hwnd
))
goto
END
;
}
/* We can't activate a child window */
if
((
wndPtr
->
dwStyle
&
WS_CHILD
)
&&
!
(
wndPtr
->
dwExStyle
&
WS_EX_MDICHILD
))
/* ShowWindow won't activate a not being maximized child window */
if
((
wndPtr
->
dwStyle
&
WS_CHILD
)
&&
cmd
!=
SW_MAXIMIZE
)
swp
|=
SWP_NOACTIVATE
|
SWP_NOZORDER
;
SetWindowPos
(
hwnd
,
HWND_TOP
,
newPos
.
left
,
newPos
.
top
,
...
...
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