Bug 1124408 - Report cocoa view focus correctly when sheets are exposed. r=masayuki,smichaud

nsChildView::SetInputContext sets secure input based on
IMEInputHandler::IsOrWouldBeFocused, which should report true if the
view would get focus if the window got focus.  This fixes the function
to report NO when the focus would instead go to a sheet 'child window'.
This commit is contained in:
David Parks 2015-02-24 03:51:53 -08:00
parent a5c26ca04e
commit bbd90790c7

View File

@ -3575,7 +3575,7 @@ IMEInputHandler::IsOrWouldBeFocused()
NS_ENSURE_TRUE(!Destroyed(), false);
NSWindow* window = [mView window];
NS_ENSURE_TRUE(window, false);
return [window firstResponder] == mView;
return [window firstResponder] == mView && ![window attachedSheet];
NS_OBJC_END_TRY_ABORT_BLOCK_RETURN(false);
}