Commit a32df6b7 authored by Florian Müllner's avatar Florian Müllner Committed by Marge Bot

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: <!1574>
parent 1a9478c7
Pipeline #248041 passed with stages
in 3 minutes and 17 seconds
......@@ -120,15 +120,15 @@ var ExtensionsService = class extends ServiceImplementation {
const extension = ExtensionUtils.deserializeExtension(serialized);
const window = new ExtensionPrefsDialog(extension);
window.realize();
window.connect('realize', () => {
let externalWindow = null;
let externalWindow = null;
if (parentWindow)
externalWindow = Shew.ExternalWindow.new_from_handle(parentWindow);
if (parentWindow)
externalWindow = Shew.ExternalWindow.new_from_handle(parentWindow);
if (externalWindow)
externalWindow.set_parent_of(window.get_surface());
if (externalWindow)
externalWindow.set_parent_of(window.get_surface());
});
if (options.modal)
window.modal = options.modal.get_boolean();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment