Bug 449734 part 2 - Add the widget to the new parent's child list. r=roc a=blocking2.0:betaN

This commit is contained in:
Mats Palmgren 2010-09-18 13:28:50 +02:00
parent 698eb966cf
commit aea63d061e

View File

@ -842,7 +842,6 @@ nsWindow::SetParent(nsIWidget *aNewParent)
return NS_ERROR_NOT_IMPLEMENTED;
}
// nsBaseWidget::SetZIndex adds child widgets to the parent's list.
nsCOMPtr<nsIWidget> kungFuDeathGrip = this;
mParent->RemoveChild(this);
@ -864,6 +863,7 @@ nsWindow::SetParent(nsIWidget *aNewParent)
GdkWindow* newParentWindow = NULL;
GtkWidget* newContainer = NULL;
if (aNewParent) {
aNewParent->AddChild(this);
newParentWindow = newParent->mGdkWindow;
if (newParentWindow) {
newContainer = get_gtk_widget_for_gdk_window(newParentWindow);