From b203d305e5e8a8ad133c7f0fbd6f5ad9ba6e0132 Mon Sep 17 00:00:00 2001 From: Damien Fouilleul Date: Fri, 11 Nov 2005 16:57:24 +0000 Subject: [PATCH] all: backport of r13193 --- activex/oleobject.cpp | 17 +++++++++++------ activex/plugin.cpp | 4 ++-- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/activex/oleobject.cpp b/activex/oleobject.cpp index 0c95bd5795..f376dec033 100644 --- a/activex/oleobject.cpp +++ b/activex/oleobject.cpp @@ -142,6 +142,12 @@ HRESULT VLCOleObject::doInPlaceActivate(LPMSG lpMsg, LPOLECLIENTSITE pActiveSite { return OLEOBJ_S_INVALIDHWND; } + else if( NULL == lprcPosRect ) + { + SetRect(&posRect, 0, 0, 0, 0); + lprcPosRect = &posRect; + lprcClipRect = &posRect; + } if( FAILED(_p_instance->onActivateInPlace(lpMsg, hwndParent, lprcPosRect, lprcClipRect)) ) { @@ -150,18 +156,16 @@ HRESULT VLCOleObject::doInPlaceActivate(LPMSG lpMsg, LPOLECLIENTSITE pActiveSite return OLEOBJ_S_CANNOT_DOVERB_NOW; } - if( NULL != p_inPlaceSite ) - p_inPlaceSite->OnPosRectChange(lprcPosRect); - - pActiveSite->ShowObject(); - _p_instance->setVisible(TRUE); - if( NULL != p_inPlaceSite ) { p_inPlaceSite->OnInPlaceActivate(); + p_inPlaceSite->OnPosRectChange(lprcPosRect); p_inPlaceSite->Release(); } + pActiveSite->ShowObject(); + _p_instance->setVisible(TRUE); + if( NULL != lpMsg ) { switch( lpMsg->message ) @@ -331,6 +335,7 @@ STDMETHODIMP VLCOleObject::SetExtent(DWORD dwDrawAspect, SIZEL *pSizel) if( NULL == pSizel ) return E_POINTER; + if( dwDrawAspect & DVASPECT_CONTENT ) { _p_instance->setExtent(*pSizel); diff --git a/activex/plugin.cpp b/activex/plugin.cpp index 0cc3a7e336..9cf355dce8 100644 --- a/activex/plugin.cpp +++ b/activex/plugin.cpp @@ -984,9 +984,9 @@ void VLCPlugin::onPositionChange(LPCRECT lprcPosRect, LPCRECT lprcClipRect) //RedrawWindow(_videownd, &posRect, NULL, RDW_INVALIDATE|RDW_ERASE|RDW_ALLCHILDREN); vlc_value_t val; val.i_int = posRect.right-posRect.left; - VLC_VariableSet(_i_vlc, "width", val); + VLC_VariableSet(_i_vlc, "conf::width", val); val.i_int = posRect.bottom-posRect.top; - VLC_VariableSet(_i_vlc, "height", val); + VLC_VariableSet(_i_vlc, "conf::height", val); }; void VLCPlugin::freezeEvents(BOOL freeze) -- 2.39.5