[gnome-shell] extensionsService: Fix setting prefs dialog parent
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] extensionsService: Fix setting prefs dialog parent
- Date: Mon, 18 Jan 2021 11:50:26 +0000 (UTC)
commit a32df6b7a3853f9e254d5fa9b1748608354ec070
Author: Florian Müllner <fmuellner gnome org>
Date: Sat Jan 16 01:43:53 2021 +0100
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>
js/dbusServices/extensions/extensionsService.js | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/js/dbusServices/extensions/extensionsService.js b/js/dbusServices/extensions/extensionsService.js
index 8217675b0c..35e7805785 100644
--- a/js/dbusServices/extensions/extensionsService.js
+++ b/js/dbusServices/extensions/extensionsService.js
@@ -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();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]