mshtml: Use NSContainer HWND in handle_blur.

This commit is contained in:
Jacek Caban 2010-04-13 20:01:59 +02:00 committed by Alexandre Julliard
parent 80f0f35c50
commit 9539cf7a4e
1 changed files with 3 additions and 3 deletions

View File

@ -109,11 +109,11 @@ static nsrefcnt NSAPI nsDOMEventListener_Release(nsIDOMEventListener *iface)
return release_listener(This);
}
static BOOL is_doc_child_focus(HTMLDocumentObj *doc)
static BOOL is_doc_child_focus(NSContainer *nscontainer)
{
HWND hwnd;
for(hwnd = GetFocus(); hwnd && hwnd != doc->hwnd; hwnd = GetParent(hwnd));
for(hwnd = GetFocus(); hwnd && hwnd != nscontainer->hwnd; hwnd = GetParent(hwnd));
return hwnd != NULL;
}
@ -129,7 +129,7 @@ static nsresult NSAPI handle_blur(nsIDOMEventListener *iface, nsIDOMEvent *event
return NS_ERROR_FAILURE;
doc_obj = doc->basedoc.doc_obj;
if(doc_obj->focus && !is_doc_child_focus(doc_obj)) {
if(doc_obj->focus && !is_doc_child_focus(doc_obj->nscontainer)) {
doc_obj->focus = FALSE;
notif_focus(doc_obj);
}