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
68b8a4ab
Commit
68b8a4ab
authored
Nov 09, 2005
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't call SetWindowPos in ShowWindow if a parent window is not
visible, only toggle the WS_VISIBLE flag.
parent
86b67492
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
9 deletions
+32
-9
msg.c
dlls/user/tests/msg.c
+17
-4
winpos.c
dlls/x11drv/winpos.c
+15
-5
No files found.
dlls/user/tests/msg.c
View file @
68b8a4ab
...
@@ -543,6 +543,15 @@ static const struct message WmDestroyChildSeq[] = {
...
@@ -543,6 +543,15 @@ static const struct message WmDestroyChildSeq[] = {
{
WM_NCDESTROY
,
sent
},
{
WM_NCDESTROY
,
sent
},
{
0
}
{
0
}
};
};
/* DestroyWindow for a visible child window with invisible parent */
static
const
struct
message
WmDestroyInvisibleChildSeq
[]
=
{
{
HCBT_DESTROYWND
,
hook
},
{
WM_PARENTNOTIFY
,
sent
|
parent
|
wparam
,
WM_DESTROY
},
{
WM_SHOWWINDOW
,
sent
|
wparam
,
0
},
{
WM_DESTROY
,
sent
},
{
WM_NCDESTROY
,
sent
},
{
0
}
};
/* Moving the mouse in nonclient area */
/* Moving the mouse in nonclient area */
static
const
struct
message
WmMouseMoveInNonClientAreaSeq
[]
=
{
/* FIXME: add */
static
const
struct
message
WmMouseMoveInNonClientAreaSeq
[]
=
{
/* FIXME: add */
{
WM_NCHITTEST
,
sent
},
{
WM_NCHITTEST
,
sent
},
...
@@ -2855,14 +2864,14 @@ static void test_showwindow(void)
...
@@ -2855,14 +2864,14 @@ static void test_showwindow(void)
/* ShowWindow(SW_SHOWNA) with child and parent invisible */
/* ShowWindow(SW_SHOWNA) with child and parent invisible */
trace
(
"calling ShowWindow( SW_SHOWNA) for invisible child with invisible parent
\n
"
);
trace
(
"calling ShowWindow( SW_SHOWNA) for invisible child with invisible parent
\n
"
);
ok
(
ShowWindow
(
hchild
,
SW_SHOWNA
)
==
FALSE
,
"ShowWindow: window was visible
\n
"
);
ok
(
ShowWindow
(
hchild
,
SW_SHOWNA
)
==
FALSE
,
"ShowWindow: window was visible
\n
"
);
ok_sequence
(
WmSHOWNAChildInvisParInvis
,
"ShowWindow(SW_SHOWNA) invisible child and parent"
,
TRU
E
);
ok_sequence
(
WmSHOWNAChildInvisParInvis
,
"ShowWindow(SW_SHOWNA) invisible child and parent"
,
FALS
E
);
trace
(
"done
\n
"
);
trace
(
"done
\n
"
);
/* ShowWindow(SW_SHOWNA) with child visible and parent invisible */
/* ShowWindow(SW_SHOWNA) with child visible and parent invisible */
ok
(
ShowWindow
(
hchild
,
SW_SHOW
)
!=
FALSE
,
"ShowWindow: window was invisible
\n
"
);
ok
(
ShowWindow
(
hchild
,
SW_SHOW
)
!=
FALSE
,
"ShowWindow: window was invisible
\n
"
);
flush_sequence
();
flush_sequence
();
trace
(
"calling ShowWindow( SW_SHOWNA) for the visible child and invisible parent
\n
"
);
trace
(
"calling ShowWindow( SW_SHOWNA) for the visible child and invisible parent
\n
"
);
ok
(
ShowWindow
(
hchild
,
SW_SHOWNA
)
!=
FALSE
,
"ShowWindow: window was invisible
\n
"
);
ok
(
ShowWindow
(
hchild
,
SW_SHOWNA
)
!=
FALSE
,
"ShowWindow: window was invisible
\n
"
);
ok_sequence
(
WmSHOWNAChildVisParInvis
,
"ShowWindow(SW_SHOWNA) visible child and invisible parent"
,
TRU
E
);
ok_sequence
(
WmSHOWNAChildVisParInvis
,
"ShowWindow(SW_SHOWNA) visible child and invisible parent"
,
FALS
E
);
trace
(
"done
\n
"
);
trace
(
"done
\n
"
);
/* ShowWindow(SW_SHOWNA) with child visible and parent visible */
/* ShowWindow(SW_SHOWNA) with child visible and parent visible */
ShowWindow
(
hwnd
,
SW_SHOW
);
ShowWindow
(
hwnd
,
SW_SHOW
);
...
@@ -3176,12 +3185,12 @@ static void test_messages(void)
...
@@ -3176,12 +3185,12 @@ static void test_messages(void)
ok_sequence
(
WmCreateChildSeq
,
"CreateWindow:child"
,
FALSE
);
ok_sequence
(
WmCreateChildSeq
,
"CreateWindow:child"
,
FALSE
);
ShowWindow
(
hchild
,
SW_SHOW
);
ShowWindow
(
hchild
,
SW_SHOW
);
ok_sequence
(
WmShowChildInvisibleParentSeq
,
"ShowWindow:show child with invisible parent"
,
TRU
E
);
ok_sequence
(
WmShowChildInvisibleParentSeq
,
"ShowWindow:show child with invisible parent"
,
FALS
E
);
ok
(
GetWindowLongA
(
hchild
,
GWL_STYLE
)
&
WS_VISIBLE
,
"WS_VISIBLE should be set
\n
"
);
ok
(
GetWindowLongA
(
hchild
,
GWL_STYLE
)
&
WS_VISIBLE
,
"WS_VISIBLE should be set
\n
"
);
ok
(
!
IsWindowVisible
(
hchild
),
"IsWindowVisible() should return FALSE
\n
"
);
ok
(
!
IsWindowVisible
(
hchild
),
"IsWindowVisible() should return FALSE
\n
"
);
ShowWindow
(
hchild
,
SW_HIDE
);
ShowWindow
(
hchild
,
SW_HIDE
);
ok_sequence
(
WmHideChildInvisibleParentSeq
,
"ShowWindow:hide child with invisible parent"
,
TRU
E
);
ok_sequence
(
WmHideChildInvisibleParentSeq
,
"ShowWindow:hide child with invisible parent"
,
FALS
E
);
ok
(
!
(
GetWindowLongA
(
hchild
,
GWL_STYLE
)
&
WS_VISIBLE
),
"WS_VISIBLE should be not set
\n
"
);
ok
(
!
(
GetWindowLongA
(
hchild
,
GWL_STYLE
)
&
WS_VISIBLE
),
"WS_VISIBLE should be not set
\n
"
);
ok
(
!
IsWindowVisible
(
hchild
),
"IsWindowVisible() should return FALSE
\n
"
);
ok
(
!
IsWindowVisible
(
hchild
),
"IsWindowVisible() should return FALSE
\n
"
);
...
@@ -3195,7 +3204,11 @@ static void test_messages(void)
...
@@ -3195,7 +3204,11 @@ static void test_messages(void)
ok
(
!
(
GetWindowLongA
(
hchild
,
GWL_STYLE
)
&
WS_VISIBLE
),
"WS_VISIBLE should not be set
\n
"
);
ok
(
!
(
GetWindowLongA
(
hchild
,
GWL_STYLE
)
&
WS_VISIBLE
),
"WS_VISIBLE should not be set
\n
"
);
ok
(
!
IsWindowVisible
(
hchild
),
"IsWindowVisible() should return FALSE
\n
"
);
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
);
flush_sequence
();
DestroyWindow
(
hchild
);
DestroyWindow
(
hchild
);
ok_sequence
(
WmDestroyInvisibleChildSeq
,
"DestroyInvisibleChildSeq"
,
FALSE
);
DestroyWindow
(
hparent
);
DestroyWindow
(
hparent
);
flush_sequence
();
flush_sequence
();
...
...
dlls/x11drv/winpos.c
View file @
68b8a4ab
...
@@ -1003,12 +1003,22 @@ BOOL X11DRV_ShowWindow( HWND hwnd, INT cmd )
...
@@ -1003,12 +1003,22 @@ BOOL X11DRV_ShowWindow( HWND hwnd, INT cmd )
if
(
!
IsWindow
(
hwnd
))
return
wasVisible
;
if
(
!
IsWindow
(
hwnd
))
return
wasVisible
;
}
}
/* ShowWindow won't activate a not being maximized child window */
if
(
!
IsWindowVisible
(
GetAncestor
(
hwnd
,
GA_PARENT
)))
if
((
style
&
WS_CHILD
)
&&
cmd
!=
SW_MAXIMIZE
)
{
swp
|=
SWP_NOACTIVATE
|
SWP_NOZORDER
;
/* if parent is not visible simply toggle WS_VISIBLE and return */
if
(
showFlag
)
WIN_SetStyle
(
hwnd
,
WS_VISIBLE
,
0
);
else
WIN_SetStyle
(
hwnd
,
0
,
WS_VISIBLE
);
}
else
{
/* ShowWindow won't activate a not being maximized child window */
if
((
style
&
WS_CHILD
)
&&
cmd
!=
SW_MAXIMIZE
)
swp
|=
SWP_NOACTIVATE
|
SWP_NOZORDER
;
SetWindowPos
(
hwnd
,
HWND_TOP
,
newPos
.
left
,
newPos
.
top
,
newPos
.
right
,
newPos
.
bottom
,
LOWORD
(
swp
)
);
}
SetWindowPos
(
hwnd
,
HWND_TOP
,
newPos
.
left
,
newPos
.
top
,
newPos
.
right
,
newPos
.
bottom
,
LOWORD
(
swp
)
);
if
(
cmd
==
SW_HIDE
)
if
(
cmd
==
SW_HIDE
)
{
{
HWND
hFocus
;
HWND
hFocus
;
...
...
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