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
d13a44e4
Commit
d13a44e4
authored
Feb 22, 2016
by
Jacek Caban
Committed by
Alexandre Julliard
Feb 25, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Don't use window's parent as an owner if WS_CHILD style is not set.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
47b2238b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
1 deletion
+27
-1
win.c
dlls/user32/tests/win.c
+25
-0
window.c
server/window.c
+2
-1
No files found.
dlls/user32/tests/win.c
View file @
d13a44e4
...
...
@@ -652,6 +652,31 @@ static void test_parent_owner(void)
DestroyWindow
(
child
);
DestroyWindow
(
test
);
DestroyWindow
(
owner
);
/* Test that owner window takes into account WS_CHILD flag even if parent is set by SetParent. */
owner
=
create_tool_window
(
WS_VISIBLE
|
WS_OVERLAPPEDWINDOW
,
desktop
);
SetParent
(
owner
,
hwndMain
);
check_parents
(
owner
,
hwndMain
,
hwndMain
,
NULL
,
NULL
,
hwndMain
,
owner
);
test
=
create_tool_window
(
WS_VISIBLE
|
WS_OVERLAPPEDWINDOW
,
owner
);
check_parents
(
test
,
desktop
,
owner
,
NULL
,
owner
,
test
,
test
);
DestroyWindow
(
owner
);
DestroyWindow
(
test
);
owner
=
create_tool_window
(
WS_VISIBLE
|
WS_CHILD
,
desktop
);
SetParent
(
owner
,
hwndMain
);
check_parents
(
owner
,
hwndMain
,
hwndMain
,
hwndMain
,
NULL
,
hwndMain
,
hwndMain
);
test
=
create_tool_window
(
WS_VISIBLE
|
WS_OVERLAPPEDWINDOW
,
owner
);
check_parents
(
test
,
desktop
,
hwndMain
,
NULL
,
hwndMain
,
test
,
test
);
DestroyWindow
(
owner
);
DestroyWindow
(
test
);
owner
=
create_tool_window
(
WS_VISIBLE
|
WS_POPUP
|
WS_CHILD
,
desktop
);
SetParent
(
owner
,
hwndMain
);
check_parents
(
owner
,
hwndMain
,
hwndMain
,
NULL
,
NULL
,
hwndMain
,
owner
);
test
=
create_tool_window
(
WS_VISIBLE
|
WS_OVERLAPPEDWINDOW
,
owner
);
check_parents
(
test
,
desktop
,
owner
,
NULL
,
owner
,
test
,
test
);
DestroyWindow
(
owner
);
DestroyWindow
(
test
);
}
static
BOOL
CALLBACK
enum_proc
(
HWND
hwnd
,
LPARAM
lParam
)
...
...
server/window.c
View file @
d13a44e4
...
...
@@ -1901,7 +1901,8 @@ DECL_HANDLER(create_window)
return
;
}
else
/* owner must be a top-level window */
while
(
!
is_desktop_window
(
owner
->
parent
))
owner
=
owner
->
parent
;
while
((
owner
->
style
&
(
WS_POPUP
|
WS_CHILD
))
==
WS_CHILD
&&
!
is_desktop_window
(
owner
->
parent
))
owner
=
owner
->
parent
;
}
atom
=
cls_name
.
len
?
find_global_atom
(
NULL
,
&
cls_name
)
:
req
->
atom
;
...
...
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