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
a800dfe5
Commit
a800dfe5
authored
Apr 26, 2005
by
Ulrich Czekalla
Committed by
Alexandre Julliard
Apr 26, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SetParent should not remove menu from non-child windows.
parent
1fbea59f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
6 deletions
+11
-6
win.c
dlls/user/tests/win.c
+11
-1
window.c
dlls/x11drv/window.c
+0
-5
No files found.
dlls/user/tests/win.c
View file @
a800dfe5
...
...
@@ -2409,8 +2409,9 @@ static void test_SetParent(void)
{
BOOL
ret
;
HWND
desktop
=
GetDesktopWindow
();
HMENU
hMenu
;
BOOL
is_win9x
=
GetWindowLongPtrW
(
desktop
,
GWLP_WNDPROC
)
==
0
;
HWND
parent
,
child1
,
child2
,
child3
,
child4
;
HWND
parent
,
child1
,
child2
,
child3
,
child4
,
sibling
;
parent
=
CreateWindowExA
(
0
,
"static"
,
NULL
,
WS_OVERLAPPEDWINDOW
,
100
,
100
,
200
,
200
,
0
,
0
,
0
,
NULL
);
...
...
@@ -2476,10 +2477,19 @@ todo_wine {
check_parents
(
child4
,
desktop
,
child2
,
child2
,
child2
,
child4
,
parent
);
}
hMenu
=
CreateMenu
();
sibling
=
CreateWindowExA
(
0
,
"static"
,
NULL
,
WS_OVERLAPPEDWINDOW
,
100
,
100
,
200
,
200
,
0
,
hMenu
,
0
,
NULL
);
assert
(
sibling
!=
0
);
ok
(
SetParent
(
sibling
,
parent
)
!=
0
,
"SetParent should not fail
\n
"
);
ok
(
GetMenu
(
sibling
)
==
hMenu
,
"SetParent should not remove menu
\n
"
);
ret
=
DestroyWindow
(
parent
);
ok
(
ret
,
"DestroyWindow() error %ld
\n
"
,
GetLastError
());
ok
(
!
IsWindow
(
parent
),
"parent still exists
\n
"
);
ok
(
!
IsWindow
(
sibling
),
"sibling still exists
\n
"
);
ok
(
!
IsWindow
(
child1
),
"child1 still exists
\n
"
);
ok
(
!
IsWindow
(
child2
),
"child2 still exists
\n
"
);
ok
(
!
IsWindow
(
child3
),
"child3 still exists
\n
"
);
...
...
dlls/x11drv/window.c
View file @
a800dfe5
...
...
@@ -1134,11 +1134,6 @@ HWND X11DRV_SetParent( HWND hwnd, HWND parent )
if
(
parent
!=
GetDesktopWindow
())
/* a child window */
{
if
(
!
(
GetWindowLongW
(
hwnd
,
GWL_STYLE
)
&
WS_CHILD
))
{
HMENU
menu
=
(
HMENU
)
SetWindowLongPtrW
(
hwnd
,
GWLP_ID
,
0
);
if
(
menu
)
DestroyMenu
(
menu
);
}
if
(
old_parent
==
GetDesktopWindow
())
{
/* destroy the old X windows */
...
...
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