mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1259492 - Ensure window position is constrained to the screen after it has been sized properly in nsXULWindow::OnChromeLoaded. r=emk a=ritu
This commit is contained in:
parent
b0055baf3c
commit
1d47c6c64b
@ -1080,14 +1080,18 @@ void nsXULWindow::OnChromeLoaded()
|
||||
int32_t width = 0, height = 0;
|
||||
if (NS_SUCCEEDED(cv->GetContentSize(&width, &height))) {
|
||||
treeOwner->SizeShellTo(docShellAsItem, width, height);
|
||||
// Now that we know the window's final size, we can re-do its
|
||||
// Update specified size for the final LoadPositionFromXUL call.
|
||||
specWidth = width;
|
||||
specHeight = height;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Now that we have set the window's final size, we can re-do its
|
||||
// positioning so that it is properly constrained to the screen.
|
||||
if (positionSet) {
|
||||
LoadPositionFromXUL(width, height);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
LoadPositionFromXUL(specWidth, specHeight);
|
||||
}
|
||||
|
||||
LoadMiscPersistentAttributesFromXUL();
|
||||
|
Loading…
Reference in New Issue
Block a user