mshtml: Activate nsWebBrowser after creating document window.
This commit is contained in:
parent
9f8b92c337
commit
946acd062d
|
@ -84,16 +84,16 @@ static void paint_document(HTMLDocument *This)
|
||||||
EndPaint(This->hwnd, &ps);
|
EndPaint(This->hwnd, &ps);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void activate_gecko(HTMLDocument *This)
|
static void activate_gecko(NSContainer *This)
|
||||||
{
|
{
|
||||||
TRACE("(%p) %p\n", This, This->nscontainer->window);
|
TRACE("(%p) %p\n", This, This->window);
|
||||||
|
|
||||||
SetParent(This->nscontainer->hwnd, This->hwnd);
|
SetParent(This->hwnd, This->doc->hwnd);
|
||||||
ShowWindow(This->nscontainer->hwnd, SW_SHOW);
|
ShowWindow(This->hwnd, SW_SHOW);
|
||||||
|
|
||||||
nsIBaseWindow_SetVisibility(This->nscontainer->window, TRUE);
|
nsIBaseWindow_SetVisibility(This->window, TRUE);
|
||||||
nsIBaseWindow_SetEnabled(This->nscontainer->window, TRUE);
|
nsIBaseWindow_SetEnabled(This->window, TRUE);
|
||||||
nsIWebBrowserFocus_Activate(This->nscontainer->focus);
|
nsIWebBrowserFocus_Activate(This->focus);
|
||||||
}
|
}
|
||||||
|
|
||||||
void update_doc(HTMLDocument *This, DWORD flags)
|
void update_doc(HTMLDocument *This, DWORD flags)
|
||||||
|
@ -180,8 +180,6 @@ static LRESULT WINAPI serverwnd_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
|
||||||
switch(msg) {
|
switch(msg) {
|
||||||
case WM_CREATE:
|
case WM_CREATE:
|
||||||
This->hwnd = hwnd;
|
This->hwnd = hwnd;
|
||||||
if(This->nscontainer)
|
|
||||||
activate_gecko(This);
|
|
||||||
break;
|
break;
|
||||||
case WM_PAINT:
|
case WM_PAINT:
|
||||||
paint_document(This);
|
paint_document(This);
|
||||||
|
@ -242,7 +240,8 @@ static HRESULT activate_window(HTMLDocument *This)
|
||||||
return FAILED(hres) ? hres : E_FAIL;
|
return FAILED(hres) ? hres : E_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
hres = IOleInPlaceSite_GetWindowContext(This->ipsite, &pIPFrame, &pIPWnd, &posrect, &cliprect, &frameinfo);
|
hres = IOleInPlaceSite_GetWindowContext(This->ipsite, &pIPFrame, &pIPWnd,
|
||||||
|
&posrect, &cliprect, &frameinfo);
|
||||||
if(FAILED(hres)) {
|
if(FAILED(hres)) {
|
||||||
WARN("GetWindowContext failed: %08x\n", hres);
|
WARN("GetWindowContext failed: %08x\n", hres);
|
||||||
return hres;
|
return hres;
|
||||||
|
@ -289,6 +288,9 @@ static HRESULT activate_window(HTMLDocument *This)
|
||||||
SetTimer(This->hwnd, TIMER_ID, 100, NULL);
|
SetTimer(This->hwnd, TIMER_ID, 100, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(This->nscontainer)
|
||||||
|
activate_gecko(This->nscontainer);
|
||||||
|
|
||||||
This->in_place_active = TRUE;
|
This->in_place_active = TRUE;
|
||||||
hres = IOleInPlaceSite_QueryInterface(This->ipsite, &IID_IOleInPlaceSiteEx, (void**)&ipsiteex);
|
hres = IOleInPlaceSite_QueryInterface(This->ipsite, &IID_IOleInPlaceSiteEx, (void**)&ipsiteex);
|
||||||
if(SUCCEEDED(hres)) {
|
if(SUCCEEDED(hres)) {
|
||||||
|
|
Loading…
Reference in New Issue