ieframe: When activating UI also activate the embedded document.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru> Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
8975ec118c
commit
44a983f650
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue