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
9b98246e
Commit
9b98246e
authored
Oct 07, 2019
by
Zebediah Figura
Committed by
Alexandre Julliard
Oct 08, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
strmbase: Correctly implement IVideoWindow::put_Owner().
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ed1c18e8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
16 deletions
+15
-16
videorenderer.c
dlls/quartz/tests/videorenderer.c
+2
-2
window.c
dlls/strmbase/window.c
+13
-14
No files found.
dlls/quartz/tests/videorenderer.c
View file @
9b98246e
...
...
@@ -1795,9 +1795,9 @@ static void test_video_window_owner(IVideoWindow *window, HWND hwnd, HWND our_hw
parent
=
GetAncestor
(
hwnd
,
GA_PARENT
);
ok
(
parent
==
our_hwnd
,
"Got parent %p.
\n
"
,
parent
);
style
=
GetWindowLongA
(
hwnd
,
GWL_STYLE
);
todo_wine
ok
((
style
&
WS_CHILD
),
"Got style %#x.
\n
"
,
style
);
ok
((
style
&
WS_CHILD
),
"Got style %#x.
\n
"
,
style
);
todo_wine
ok
(
GetActiveWindow
()
==
our_hwnd
,
"Got active window %p.
\n
"
,
GetActiveWindow
());
ok
(
GetActiveWindow
()
==
our_hwnd
,
"Got active window %p.
\n
"
,
GetActiveWindow
());
top_hwnd
=
get_top_window
();
ok
(
top_hwnd
==
our_hwnd
,
"Got top window %p.
\n
"
,
top_hwnd
);
...
...
dlls/strmbase/window.c
View file @
9b98246e
...
...
@@ -558,23 +558,22 @@ HRESULT WINAPI BaseControlWindowImpl_get_Height(IVideoWindow *iface, LONG *pHeig
return
S_OK
;
}
HRESULT
WINAPI
BaseControlWindowImpl_put_Owner
(
IVideoWindow
*
iface
,
OAHWND
O
wner
)
HRESULT
WINAPI
BaseControlWindowImpl_put_Owner
(
IVideoWindow
*
iface
,
OAHWND
o
wner
)
{
BaseControlWindow
*
This
=
impl_from_IVideoWindow
(
iface
);
BaseControlWindow
*
window
=
impl_from_IVideoWindow
(
iface
);
HWND
hwnd
=
window
->
baseWindow
.
hWnd
;
TRACE
(
"
(%p/%p)->(%08x)
\n
"
,
This
,
iface
,
(
DWORD
)
O
wner
);
TRACE
(
"
window %p, owner %#lx.
\n
"
,
window
,
o
wner
);
This
->
hwndOwner
=
(
HWND
)
Owner
;
SetParent
(
This
->
baseWindow
.
hWnd
,
This
->
hwndOwner
);
if
(
This
->
baseWindow
.
WindowStyles
&
WS_CHILD
)
{
LONG
old
=
GetWindowLongW
(
This
->
baseWindow
.
hWnd
,
GWL_STYLE
);
if
(
old
!=
This
->
baseWindow
.
WindowStyles
)
{
SetWindowLongW
(
This
->
baseWindow
.
hWnd
,
GWL_STYLE
,
This
->
baseWindow
.
WindowStyles
);
SetWindowPos
(
This
->
baseWindow
.
hWnd
,
0
,
0
,
0
,
0
,
0
,
SWP_FRAMECHANGED
|
SWP_NOSIZE
|
SWP_NOZORDER
);
}
}
/* Make sure we are marked as WS_CHILD before reparenting ourselves, so that
* we do not steal focus. LEGO Island depends on this. */
window
->
hwndOwner
=
(
HWND
)
owner
;
if
(
owner
)
SetWindowLongPtrW
(
hwnd
,
GWL_STYLE
,
GetWindowLongPtrW
(
hwnd
,
GWL_STYLE
)
|
WS_CHILD
);
else
SetWindowLongPtrW
(
hwnd
,
GWL_STYLE
,
GetWindowLongPtrW
(
hwnd
,
GWL_STYLE
)
&
~
WS_CHILD
);
SetParent
(
hwnd
,
(
HWND
)
owner
);
return
S_OK
;
}
...
...
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