зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1764319 [Wayland] Save initial position from nsWindow::Create() r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D143692
This commit is contained in:
Родитель
59338c231d
Коммит
0971af219a
|
@ -5602,11 +5602,14 @@ nsresult nsWindow::Create(nsIWidget* aParent, nsNativeWidget aNativeParent,
|
|||
// We need realized mShell at NativeMoveResize().
|
||||
gtk_widget_realize(mShell);
|
||||
|
||||
// With popup windows, we want to set their position.
|
||||
// Place them immediately on X11 and save initial popup position
|
||||
// on Wayland as we place Wayland popup on show.
|
||||
if (GdkIsX11Display()) {
|
||||
// With popup windows, we want to control their position, so don't
|
||||
// wait for the window manager to place them (which wouldn't
|
||||
// happen with override-redirect windows anyway).
|
||||
NativeMoveResize(/* move */ true, /* resize */ false);
|
||||
} else if (AreBoundsSane()) {
|
||||
GdkRectangle rect = DevicePixelsToGdkRectRoundOut(mBounds);
|
||||
mPopupPosition = {rect.x, rect.y};
|
||||
}
|
||||
} else { // must be eWindowType_toplevel
|
||||
mGtkWindowRoleName = "Toplevel";
|
||||
|
|
Загрузка…
Ссылка в новой задаче