Event fixes to allow key event handling by GFX widgets and fixes for window.defaultStatus.

This commit is contained in:
joki@netscape.com
1999-07-26 15:02:19 +00:00
parent b58cdfd3c0
commit 39b685f44a
22 changed files with 385 additions and 65 deletions

View File

@@ -388,12 +388,23 @@ nsFormControlFrame::PostCreateWidget(nsIPresContext* aPresContext, nscoord& aWid
{
}
// native widgets don't unset focus explicitly and don't need to repaint
// native widgets don't need to repaint
void
nsFormControlFrame::SetFocus(PRBool aOn, PRBool aRepaint)
{
if (mWidget && aOn) {
mWidget->SetFocus();
if (mWidget) {
if (aOn) {
mWidget->SetFocus();
}
else {
//Unsetting of focus on native widget is accomplised
//by pushing focus up to its parent
nsIWidget *parentWidget = mWidget->GetParent();
if (parentWidget) {
parentWidget->SetFocus();
NS_RELEASE(parentWidget);
}
}
}
}