mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 593440 - Remove remaining child widgets on windows. r=roc, a=joe.
This commit is contained in:
parent
2d72b944f4
commit
4682c37ce5
@ -2279,7 +2279,9 @@ DocumentViewerImpl::MakeWindow(const nsSize& aSize, nsIView* aContainerView)
|
||||
nsWindowType winType;
|
||||
containerItem->GetItemType(&docType);
|
||||
mParentWidget->GetWindowType(winType);
|
||||
if (winType == eWindowType_toplevel &&
|
||||
if ((winType == eWindowType_toplevel ||
|
||||
winType == eWindowType_dialog ||
|
||||
winType == eWindowType_invisible) &&
|
||||
docType == nsIDocShellTreeItem::typeChrome) {
|
||||
// If the old view is already attached to our parent, detach
|
||||
DetachFromTopLevelWidget();
|
||||
|
@ -292,7 +292,10 @@ NS_IMETHODIMP
|
||||
nsBaseWidget::AttachViewToTopLevel(EVENT_CALLBACK aViewEventFunction,
|
||||
nsIDeviceContext *aContext)
|
||||
{
|
||||
NS_ASSERTION((mWindowType == eWindowType_toplevel), "Can't attach to child?");
|
||||
NS_ASSERTION((mWindowType == eWindowType_toplevel ||
|
||||
mWindowType == eWindowType_dialog ||
|
||||
mWindowType == eWindowType_invisible),
|
||||
"Can't attach to child?");
|
||||
|
||||
mViewCallback = aViewEventFunction;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user