Commit 44a983f6 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

ieframe: When activating UI also activate the embedded document.

parent 8975ec11
......@@ -598,6 +598,32 @@ HRESULT refresh_document(DocHost *This, const VARIANT *level)
return S_OK;
}
void activate_document(DocHost *This)
{
IOleObject *oleobj;
IHlinkTarget *hlink;
HRESULT hres;
if(!This->document) return;
hres = IUnknown_QueryInterface(This->document, &IID_IHlinkTarget, (void**)&hlink);
if(SUCCEEDED(hres)) {
IHlinkTarget_Navigate(hlink, 0, NULL);
IHlinkTarget_Release(hlink);
}
hres = IUnknown_QueryInterface(This->document, &IID_IOleObject, (void**)&oleobj);
if(SUCCEEDED(hres)) {
IOleObject_DoVerb(oleobj, OLEIVERB_SHOW, NULL, NULL, -1, 0, NULL);
IOleObject_Release(oleobj);
}
refresh_document(This, NULL);
if(This->view)
IOleDocumentView_UIActivate(This->view, TRUE);
}
void release_dochost_client(DocHost *This)
{
if(This->hwnd) {
......
......@@ -283,6 +283,7 @@ HRESULT set_dochost_url(DocHost*,const WCHAR*) DECLSPEC_HIDDEN;
void handle_navigation_error(DocHost*,HRESULT,BSTR,IHTMLWindow2*) DECLSPEC_HIDDEN;
HRESULT dochost_object_available(DocHost*,IUnknown*) DECLSPEC_HIDDEN;
void set_doc_state(DocHost*,READYSTATE) DECLSPEC_HIDDEN;
void activate_document(DocHost*) DECLSPEC_HIDDEN;
void deactivate_document(DocHost*) DECLSPEC_HIDDEN;
void create_doc_view_hwnd(DocHost*) DECLSPEC_HIDDEN;
void on_commandstate_change(DocHost*,LONG,BOOL) DECLSPEC_HIDDEN;
......
......@@ -230,6 +230,8 @@ static HRESULT activate_ui(WebBrowser *This, IOleClientSite *active_site)
SetFocus(This->shell_embedding_hwnd);
notify_on_focus(This, TRUE);
activate_document(&This->doc_host);
This->ui_activated = TRUE;
return S_OK;
......
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