mirror of
https://code.videolan.org/videolan/vlc
synced 2024-07-13 02:40:52 +02:00
plugin.cpp, oleobject.cpp: fix for ShowDisplay/Visible on activation
vlccontrol.cpp: fixed small mem leak
This commit is contained in:
parent
22f28306ff
commit
3d24634c36
@ -163,8 +163,8 @@ HRESULT VLCOleObject::doInPlaceActivate(LPMSG lpMsg, LPOLECLIENTSITE pActiveSite
|
||||
p_inPlaceSite->Release();
|
||||
}
|
||||
|
||||
pActiveSite->ShowObject();
|
||||
_p_instance->setVisible(TRUE);
|
||||
if( _p_instance->getVisible() )
|
||||
pActiveSite->ShowObject();
|
||||
|
||||
if( NULL != lpMsg )
|
||||
{
|
||||
|
@ -546,7 +546,7 @@ HRESULT VLCPlugin::onLoad(void)
|
||||
** is the URL of the page the plugin is embedded into. Hence, if the MRL
|
||||
** is a relative URL, we should end up with an absolute URL
|
||||
*/
|
||||
IOleClientSite *pClientSite;
|
||||
LPOLECLIENTSITE pClientSite;
|
||||
if( SUCCEEDED(vlcOleObject->GetClientSite(&pClientSite)) && (NULL != pClientSite) )
|
||||
{
|
||||
IBindCtx *pBC = 0;
|
||||
@ -776,7 +776,7 @@ HRESULT VLCPlugin::onActivateInPlace(LPMSG lpMesg, HWND hwndParent, LPCRECT lprc
|
||||
SetWindowLongPtr(_videownd, GWLP_USERDATA, reinterpret_cast<LONG_PTR>(this));
|
||||
|
||||
if( getVisible() )
|
||||
ShowWindow(_inplacewnd, SW_SHOWNORMAL);
|
||||
ShowWindow(_inplacewnd, SW_SHOW);
|
||||
|
||||
/* set internal video width and height */
|
||||
vlc_value_t val;
|
||||
@ -813,10 +813,15 @@ HRESULT VLCPlugin::onInPlaceDeactivate(void)
|
||||
|
||||
void VLCPlugin::setVisible(BOOL fVisible)
|
||||
{
|
||||
_b_visible = fVisible;
|
||||
if( isInPlaceActive() )
|
||||
ShowWindow(_inplacewnd, fVisible ? SW_SHOWNORMAL : SW_HIDE);
|
||||
firePropChangedEvent(DISPID_Visible);
|
||||
if( fVisible != _b_visible )
|
||||
{
|
||||
_b_visible = fVisible;
|
||||
if( isInPlaceActive() )
|
||||
{
|
||||
ShowWindow(_inplacewnd, fVisible ? SW_SHOW : SW_HIDE);
|
||||
}
|
||||
firePropChangedEvent(DISPID_Visible);
|
||||
}
|
||||
};
|
||||
|
||||
void VLCPlugin::setFocus(BOOL fFocus)
|
||||
|
@ -371,6 +371,7 @@ STDMETHODIMP VLCControl::setVariable(BSTR name, VARIANT value)
|
||||
hr = VariantChangeType(&arg, &value, 0, VT_BSTR);
|
||||
if( SUCCEEDED(hr) )
|
||||
{
|
||||
i_type = VLC_VAR_STRING;
|
||||
val.psz_string = CStrFromBSTR(codePage, V_BSTR(&arg));
|
||||
VariantClear(&arg);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user