extensionsService: Fix setting prefs dialog parent

Between the GTK4 port and the latest GTK4 version, calling realize()
on a newly created window to force its surface to be created stopped
working.

So instead, wait for the window to get realized regularly to set its
parent.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1574>
This commit is contained in:
Florian Müllner 2021-01-16 01:43:53 +01:00 committed by Marge Bot
parent 1a9478c740
commit a32df6b7a3

View File

@ -120,8 +120,7 @@ var ExtensionsService = class extends ServiceImplementation {
const extension = ExtensionUtils.deserializeExtension(serialized);
const window = new ExtensionPrefsDialog(extension);
window.realize();
window.connect('realize', () => {
let externalWindow = null;
if (parentWindow)
@ -129,6 +128,7 @@ var ExtensionsService = class extends ServiceImplementation {
if (externalWindow)
externalWindow.set_parent_of(window.get_surface());
});
if (options.modal)
window.modal = options.modal.get_boolean();