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:
parent
1a9478c740
commit
a32df6b7a3
@ -120,15 +120,15 @@ var ExtensionsService = class extends ServiceImplementation {
|
|||||||
const extension = ExtensionUtils.deserializeExtension(serialized);
|
const extension = ExtensionUtils.deserializeExtension(serialized);
|
||||||
|
|
||||||
const window = new ExtensionPrefsDialog(extension);
|
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)
|
if (externalWindow)
|
||||||
externalWindow = Shew.ExternalWindow.new_from_handle(parentWindow);
|
externalWindow.set_parent_of(window.get_surface());
|
||||||
|
});
|
||||||
if (externalWindow)
|
|
||||||
externalWindow.set_parent_of(window.get_surface());
|
|
||||||
|
|
||||||
if (options.modal)
|
if (options.modal)
|
||||||
window.modal = options.modal.get_boolean();
|
window.modal = options.modal.get_boolean();
|
||||||
|
Loading…
Reference in New Issue
Block a user