Commit cf0c9113 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Use IOleInPlaceSiteEx if available.

parent dd88237d
......@@ -202,8 +202,18 @@ static HRESULT WINAPI OleInPlaceObjectWindowless_InPlaceDeactivate(IOleInPlaceOb
}
This->in_place_active = FALSE;
if(This->ipsite)
IOleInPlaceSite_OnInPlaceDeactivate(This->ipsite);
if(This->ipsite) {
IOleInPlaceSiteEx *ipsiteex;
HRESULT hres;
hres = IOleInPlaceSite_QueryInterface(This->ipsite, &IID_IOleInPlaceSiteEx, (void**)&ipsiteex);
if(SUCCEEDED(hres)) {
IOleInPlaceSiteEx_OnInPlaceDeactivateEx(ipsiteex, TRUE);
IOleInPlaceSiteEx_Release(ipsiteex);
}else {
IOleInPlaceSite_OnInPlaceDeactivate(This->ipsite);
}
}
return S_OK;
}
......
......@@ -227,6 +227,7 @@ static HRESULT activate_window(HTMLDocument *This)
IOleInPlaceUIWindow *pIPWnd;
IOleInPlaceFrame *pIPFrame;
IOleCommandTarget *cmdtrg;
IOleInPlaceSiteEx *ipsiteex;
RECT posrect, cliprect;
OLEINPLACEFRAMEINFO frameinfo;
HWND parent_hwnd;
......@@ -289,7 +290,17 @@ static HRESULT activate_window(HTMLDocument *This)
}
This->in_place_active = TRUE;
hres = IOleInPlaceSite_OnInPlaceActivate(This->ipsite);
hres = IOleInPlaceSite_QueryInterface(This->ipsite, &IID_IOleInPlaceSiteEx, (void**)&ipsiteex);
if(SUCCEEDED(hres)) {
BOOL redraw = FALSE;
hres = IOleInPlaceSiteEx_OnInPlaceActivateEx(ipsiteex, &redraw, 0);
IOleInPlaceSiteEx_Release(ipsiteex);
if(redraw)
FIXME("unsupported redraw\n");
}else{
hres = IOleInPlaceSite_OnInPlaceActivate(This->ipsite);
}
if(FAILED(hres)) {
WARN("OnInPlaceActivate failed: %08x\n", hres);
This->in_place_active = FALSE;
......
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