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
cc3f73be
Commit
cc3f73be
authored
Oct 08, 2019
by
Zebediah Figura
Committed by
Alexandre Julliard
Oct 09, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
strmbase: More properly implement IVideoWindow::SetWindowForeground().
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
a3d3b399
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
17 deletions
+13
-17
videorenderer.c
dlls/quartz/tests/videorenderer.c
+4
-4
window.c
dlls/strmbase/window.c
+9
-13
No files found.
dlls/quartz/tests/videorenderer.c
View file @
cc3f73be
...
...
@@ -1619,7 +1619,7 @@ static void test_video_window_state(IVideoWindow *window, HWND hwnd, HWND our_hw
ok
(
GetFocus
()
==
hwnd
,
"Got focus window %p.
\n
"
,
GetFocus
());
ok
(
GetForegroundWindow
()
==
hwnd
,
"Got foreground window %p.
\n
"
,
GetForegroundWindow
());
top
=
get_top_window
();
todo_wine
ok
(
top
==
hwnd
,
"Got top window %p.
\n
"
,
top
);
ok
(
top
==
hwnd
,
"Got top window %p.
\n
"
,
top
);
hr
=
IVideoWindow_SetWindowForeground
(
window
,
OAFALSE
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
...
...
@@ -1632,9 +1632,9 @@ static void test_video_window_state(IVideoWindow *window, HWND hwnd, HWND our_hw
SetWindowPos
(
our_hwnd
,
HWND_TOP
,
0
,
0
,
0
,
0
,
SWP_NOMOVE
|
SWP_NOSIZE
);
hr
=
IVideoWindow_SetWindowForeground
(
window
,
OAFALSE
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
todo_wine
ok
(
GetActiveWindow
()
==
our_hwnd
,
"Got active window %p.
\n
"
,
GetActiveWindow
());
todo_wine
ok
(
GetFocus
()
==
our_hwnd
,
"Got focus window %p.
\n
"
,
GetFocus
());
todo_wine
ok
(
GetForegroundWindow
()
==
our_hwnd
,
"Got foreground window %p.
\n
"
,
GetForegroundWindow
());
ok
(
GetActiveWindow
()
==
our_hwnd
,
"Got active window %p.
\n
"
,
GetActiveWindow
());
ok
(
GetFocus
()
==
our_hwnd
,
"Got focus window %p.
\n
"
,
GetFocus
());
ok
(
GetForegroundWindow
()
==
our_hwnd
,
"Got foreground window %p.
\n
"
,
GetForegroundWindow
());
top
=
get_top_window
();
ok
(
top
==
hwnd
,
"Got top window %p.
\n
"
,
top
);
}
...
...
dlls/strmbase/window.c
View file @
cc3f73be
...
...
@@ -654,29 +654,25 @@ HRESULT WINAPI BaseControlWindowImpl_put_FullScreenMode(IVideoWindow *iface, LON
return
E_NOTIMPL
;
}
HRESULT
WINAPI
BaseControlWindowImpl_SetWindowForeground
(
IVideoWindow
*
iface
,
LONG
F
ocus
)
HRESULT
WINAPI
BaseControlWindowImpl_SetWindowForeground
(
IVideoWindow
*
iface
,
LONG
f
ocus
)
{
BaseControlWindow
*
This
=
impl_from_IVideoWindow
(
iface
);
BOOL
ret
;
BaseControlWindow
*
window
=
impl_from_IVideoWindow
(
iface
);
UINT
flags
=
SWP_NOMOVE
|
SWP_NOSIZE
;
IPin
*
pPin
;
HRESULT
hr
;
TRACE
(
"
(%p/%p)->(%d)
\n
"
,
This
,
iface
,
F
ocus
);
TRACE
(
"
window %p, focus %d.
\n
"
,
window
,
f
ocus
);
if
(
(
Focus
!=
OAFALSE
)
&&
(
Focus
!=
OATRUE
)
)
if
(
focus
!=
OAFALSE
&&
focus
!=
OATRUE
)
return
E_INVALIDARG
;
hr
=
IPin_ConnectedTo
(
&
This
->
pPin
->
IPin_iface
,
&
pPin
);
hr
=
IPin_ConnectedTo
(
&
window
->
pPin
->
IPin_iface
,
&
pPin
);
if
((
hr
!=
S_OK
)
||
!
pPin
)
return
VFW_E_NOT_CONNECTED
;
if
(
Focus
)
ret
=
SetForegroundWindow
(
This
->
baseWindow
.
hWnd
);
else
ret
=
SetWindowPos
(
This
->
baseWindow
.
hWnd
,
HWND_TOP
,
0
,
0
,
0
,
0
,
SWP_NOMOVE
|
SWP_NOSIZE
);
if
(
!
ret
)
return
E_FAIL
;
if
(
!
focus
)
flags
|=
SWP_NOACTIVATE
;
SetWindowPos
(
window
->
baseWindow
.
hWnd
,
HWND_TOP
,
0
,
0
,
0
,
0
,
flags
);
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