Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Steve Lhomme
VLC
Commits
fe23407a
Commit
fe23407a
authored
Dec 18, 2004
by
ipkiss
Browse files
* skins: Reparent the embedded vout window when switching to the wx intf
parent
98d5f291
Changes
4
Hide whitespace changes
Inline
Side-by-side
modules/gui/skins2/src/theme_loader.cpp
View file @
fe23407a
...
...
@@ -101,7 +101,7 @@ bool ThemeLoader::load( const string &fileName )
if
(
skin_last
)
free
(
skin_last
);
// The new theme cannot embed a video output yet
getIntf
()
->
p_sys
->
p_vlcProc
->
setVoutUnused
();
VlcProc
::
instance
(
getIntf
()
)
->
dropVout
();
return
true
;
}
...
...
modules/gui/skins2/src/vlcproc.cpp
View file @
fe23407a
...
...
@@ -163,6 +163,17 @@ void VlcProc::setVoutWindow( void *pVoutWindow )
}
void
VlcProc
::
dropVout
()
{
if
(
m_pVout
)
{
if
(
vout_Control
(
m_pVout
,
VOUT_REPARENT
)
!=
VLC_SUCCESS
)
vout_Control
(
m_pVout
,
VOUT_CLOSE
);
m_pVout
=
NULL
;
}
}
void
VlcProc
::
manage
()
{
// Did the user requested to quit vlc ?
...
...
modules/gui/skins2/src/vlcproc.hpp
View file @
fe23407a
...
...
@@ -68,9 +68,9 @@ class VlcProc: public SkinObject
/// Indicate whether the embedded video output is currently used
bool
isVoutUsed
()
const
{
return
m_pVout
;
}
///
Forget that
an embedded video output is used
(typically used when
///
changing skins, since the video output cannot change parent
)
void
setVoutUnused
()
{
m_pVout
=
NULL
;
}
///
If
an embedded video output is used
, drop it (i.e. tell it to stop
///
using our window handle
)
void
dropVout
();
protected:
// Protected because it is a singleton
...
...
modules/gui/skins2/src/vout_window.cpp
View file @
fe23407a
...
...
@@ -43,7 +43,15 @@ VoutWindow::~VoutWindow()
{
delete
m_pImage
;
}
// XXX we should stop the vout before destroying the window!
// Get the VlcProc
VlcProc
*
pVlcProc
=
getIntf
()
->
p_sys
->
p_vlcProc
;
// Reparent the video output
if
(
pVlcProc
&&
pVlcProc
->
isVoutUsed
()
)
{
pVlcProc
->
dropVout
();
}
}
...
...
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