mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-26 04:09:50 +00:00
Bug 1682136 - Allow slop when the window position is persistent and it has no parent. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D109708
This commit is contained in:
parent
366b431f08
commit
c6dccb4a09
@ -1286,6 +1286,7 @@ bool AppWindow::LoadPositionFromXUL(int32_t aSpecWidth, int32_t aSpecHeight) {
|
||||
gotPosition = true;
|
||||
}
|
||||
|
||||
bool allowSlop = false;
|
||||
if (gotPosition) {
|
||||
// our position will be relative to our parent, if any
|
||||
nsCOMPtr<nsIBaseWindow> parent(do_QueryReferent(mParentWindow));
|
||||
@ -1302,9 +1303,10 @@ bool AppWindow::LoadPositionFromXUL(int32_t aSpecWidth, int32_t aSpecHeight) {
|
||||
}
|
||||
} else {
|
||||
StaggerPosition(specX, specY, cssWidth, cssHeight);
|
||||
allowSlop = true;
|
||||
}
|
||||
}
|
||||
mWindow->ConstrainPosition(false, &specX, &specY);
|
||||
mWindow->ConstrainPosition(allowSlop, &specX, &specY);
|
||||
if (specX != currX || specY != currY) {
|
||||
SetPositionDesktopPix(specX, specY);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user