Bug 1735294 [Wayland] Don't move wayland popups at nsWindow::Create() r=jhorak

Differential Revision: https://phabricator.services.mozilla.com/D128189
This commit is contained in:
stransky 2021-10-12 13:06:35 +00:00
Родитель 8ca969082f
Коммит c538fad3e3
1 изменённых файлов: 7 добавлений и 4 удалений

Просмотреть файл

@ -5487,10 +5487,12 @@ nsresult nsWindow::Create(nsIWidget* aParent, nsNativeWidget aNativeParent,
// We need realized mShell at NativeMoveResize().
gtk_widget_realize(mShell);
// 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);
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 { // must be eWindowType_toplevel
mGtkWindowRoleName = "Toplevel";
SetDefaultIcon();
@ -5923,6 +5925,7 @@ void nsWindow::NativeMoveResize(bool aMoved, bool aResized) {
NativeShow(false);
}
if (aMoved) {
LOG((" moving to %d x %d", topLeft.x, topLeft.y));
gtk_window_move(GTK_WINDOW(mShell), topLeft.x, topLeft.y);
}
return;