diff --git a/js/ui/environment.js b/js/ui/environment.js index a1863268c..224456d6a 100644 --- a/js/ui/environment.js +++ b/js/ui/environment.js @@ -9,6 +9,7 @@ imports.gi.versions.Atspi = '2.0'; imports.gi.versions.Clutter = Config.LIBMUTTER_API_VERSION; imports.gi.versions.Cogl = Config.LIBMUTTER_API_VERSION; imports.gi.versions.Gcr = '4'; +imports.gi.versions.Gdk = '4.0'; imports.gi.versions.Gdm = '1.0'; imports.gi.versions.Geoclue = '2.0'; imports.gi.versions.Gio = '2.0'; @@ -42,7 +43,7 @@ try { _injectSoup3Compat(Soup); } -const { Clutter, Gio, GLib, GObject, Meta, Polkit, Shell, St } = imports.gi; +const {Clutter, Gdk, Gio, GLib, GObject, Meta, Polkit, Shell, St} = imports.gi; const Gettext = imports.gettext; const System = imports.system; const SignalTracker = imports.misc.signalTracker; @@ -453,6 +454,9 @@ function init() { Math.clamp = function (x, lower, upper) { return Math.min(Math.max(x, lower), upper); }; + + // Prevent extensions from opening a display connection to ourselves + Gdk.set_allowed_backends(''); } // adjustAnimationTime: