Commit 3c3f388b authored by Damien Fouilleul's avatar Damien Fouilleul

oleobject.cpp: fixed order of notifications for buggy containers like Delphi,...

oleobject.cpp: fixed order of notifications for buggy containers like Delphi, added default size at activation
plugin.cpp: set configuration width/height when resizing control
parent 5fe40a75
......@@ -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);
......
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment