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
5ae51c47
Commit
5ae51c47
authored
Jan 21, 2005
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tweak SetWindowPos flags handling to make a few more of the messaging
tests pass.
parent
8c51807b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
7 deletions
+10
-7
msg.c
dlls/user/tests/msg.c
+2
-2
winpos.c
dlls/x11drv/winpos.c
+8
-5
No files found.
dlls/user/tests/msg.c
View file @
5ae51c47
...
...
@@ -2878,12 +2878,12 @@ static void test_messages(void)
ok
(
!
IsWindowVisible
(
hchild
),
"IsWindowVisible() should return FALSE
\n
"
);
SetWindowPos
(
hchild
,
0
,
0
,
0
,
0
,
0
,
SWP_SHOWWINDOW
|
SWP_NOSIZE
|
SWP_NOMOVE
|
SWP_NOACTIVATE
|
SWP_NOZORDER
);
ok_sequence
(
WmShowChildInvisibleParentSeq_2
,
"SetWindowPos:show child with invisible parent"
,
TRU
E
);
ok_sequence
(
WmShowChildInvisibleParentSeq_2
,
"SetWindowPos:show child with invisible parent"
,
FALS
E
);
ok
(
GetWindowLongA
(
hchild
,
GWL_STYLE
)
&
WS_VISIBLE
,
"WS_VISIBLE should be set
\n
"
);
ok
(
!
IsWindowVisible
(
hchild
),
"IsWindowVisible() should return FALSE
\n
"
);
SetWindowPos
(
hchild
,
0
,
0
,
0
,
0
,
0
,
SWP_HIDEWINDOW
|
SWP_NOSIZE
|
SWP_NOMOVE
|
SWP_NOACTIVATE
|
SWP_NOZORDER
);
ok_sequence
(
WmHideChildInvisibleParentSeq_2
,
"SetWindowPos:hide child with invisible parent"
,
TRU
E
);
ok_sequence
(
WmHideChildInvisibleParentSeq_2
,
"SetWindowPos:hide child with invisible parent"
,
FALS
E
);
ok
(
!
(
GetWindowLongA
(
hchild
,
GWL_STYLE
)
&
WS_VISIBLE
),
"WS_VISIBLE should not be set
\n
"
);
ok
(
!
IsWindowVisible
(
hchild
),
"IsWindowVisible() should return FALSE
\n
"
);
...
...
dlls/x11drv/winpos.c
View file @
5ae51c47
...
...
@@ -521,6 +521,7 @@ static HWND SWP_DoOwnedPopups(HWND hwnd, HWND hwndInsertAfter)
/* fix redundant flags and values in the WINDOWPOS structure */
static
BOOL
fixup_flags
(
WINDOWPOS
*
winpos
)
{
HWND
parent
;
WND
*
wndPtr
=
WIN_GetPtr
(
winpos
->
hwnd
);
BOOL
ret
=
TRUE
;
...
...
@@ -542,6 +543,9 @@ static BOOL fixup_flags( WINDOWPOS *winpos )
if
(
winpos
->
cy
<
0
)
winpos
->
cy
=
0
;
else
if
(
winpos
->
cy
>
32767
)
winpos
->
cy
=
32767
;
parent
=
GetAncestor
(
winpos
->
hwnd
,
GA_PARENT
);
if
(
!
IsWindowVisible
(
parent
))
winpos
->
flags
|=
SWP_NOREDRAW
;
if
(
wndPtr
->
dwStyle
&
WS_VISIBLE
)
winpos
->
flags
&=
~
SWP_SHOWWINDOW
;
else
{
...
...
@@ -558,7 +562,7 @@ static BOOL fixup_flags( WINDOWPOS *winpos )
if
((
wndPtr
->
dwStyle
&
(
WS_POPUP
|
WS_CHILD
))
!=
WS_CHILD
)
{
if
(
!
(
winpos
->
flags
&
SWP_NOACTIVATE
))
/* Bring to the top when activating */
if
(
!
(
winpos
->
flags
&
(
SWP_NOACTIVATE
|
SWP_HIDEWINDOW
)
))
/* Bring to the top when activating */
{
winpos
->
flags
&=
~
SWP_NOZORDER
;
winpos
->
hwndInsertAfter
=
HWND_TOP
;
...
...
@@ -589,7 +593,7 @@ static BOOL fixup_flags( WINDOWPOS *winpos )
}
else
{
if
(
GetAncestor
(
winpos
->
hwndInsertAfter
,
GA_PARENT
)
!=
wndPtr
->
parent
)
ret
=
FALSE
;
if
(
GetAncestor
(
winpos
->
hwndInsertAfter
,
GA_PARENT
)
!=
parent
)
ret
=
FALSE
;
else
{
/* don't need to change the Zorder of hwnd if it's already inserted
...
...
@@ -860,7 +864,7 @@ BOOL X11DRV_SetWindowPos( WINDOWPOS *winpos )
else
if
(
winpos
->
flags
&
SWP_SHOWWINDOW
)
ShowCaret
(
winpos
->
hwnd
);
if
(
!
(
winpos
->
flags
&
SWP_NOACTIVATE
))
if
(
!
(
winpos
->
flags
&
(
SWP_NOACTIVATE
|
SWP_HIDEWINDOW
)
))
{
/* child windows get WM_CHILDACTIVATE message */
if
((
GetWindowLongW
(
winpos
->
hwnd
,
GWL_STYLE
)
&
(
WS_CHILD
|
WS_POPUP
))
==
WS_CHILD
)
...
...
@@ -1071,8 +1075,7 @@ BOOL X11DRV_ShowWindow( HWND hwnd, INT cmd )
{
case
SW_HIDE
:
if
(
!
wasVisible
)
goto
END
;
swp
|=
SWP_HIDEWINDOW
|
SWP_NOSIZE
|
SWP_NOMOVE
|
SWP_NOACTIVATE
|
SWP_NOZORDER
;
swp
|=
SWP_HIDEWINDOW
|
SWP_NOSIZE
|
SWP_NOMOVE
|
SWP_NOZORDER
;
break
;
case
SW_SHOWMINNOACTIVE
:
...
...
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