[gnome-shell] introspect: Use MetaContext:unsafe-mode instead of setting
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] introspect: Use MetaContext:unsafe-mode instead of setting
- Date: Fri, 3 Sep 2021 21:44:30 +0000 (UTC)
commit 317f0f5fe063356e961006fd75a9c8d9a38f47ce
Author: Florian Müllner <fmuellner gnome org>
Date: Wed Sep 1 21:18:42 2021 +0200
introspect: Use MetaContext:unsafe-mode instead of setting
The property was added precisely for this purpose, except that its
name isn't tied to the introspect API.
https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3943
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1970>
js/misc/introspect.js | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
---
diff --git a/js/misc/introspect.js b/js/misc/introspect.js
index 3cb021cb1f..8e469fbea3 100644
--- a/js/misc/introspect.js
+++ b/js/misc/introspect.js
@@ -1,8 +1,6 @@
/* exported IntrospectService */
const { Gio, GLib, Meta, Shell, St } = imports.gi;
-const INTROSPECT_SCHEMA = 'org.gnome.shell';
-const INTROSPECT_KEY = 'introspect';
const APP_ALLOWLIST = [
'org.freedesktop.impl.portal.desktop.gtk',
'org.freedesktop.impl.portal.desktop.gnome',
@@ -36,10 +34,6 @@ var IntrospectService = class {
this._syncRunningApplications();
});
- this._introspectSettings = new Gio.Settings({
- schema_id: INTROSPECT_SCHEMA,
- });
-
let tracker = Shell.WindowTracker.get_default();
tracker.connect('notify::focus-app',
() => {
@@ -73,10 +67,6 @@ var IntrospectService = class {
return app.get_windows().some(w => w.transient_for == null);
}
- _isIntrospectEnabled() {
- return this._introspectSettings.get_boolean(INTROSPECT_KEY);
- }
-
_isSenderAllowed(sender) {
return [...this._allowlistMap.values()].includes(sender);
}
@@ -138,7 +128,7 @@ var IntrospectService = class {
}
_checkInvocation(invocation) {
- if (this._isIntrospectEnabled())
+ if (global.context.unsafe_mode)
return;
if (this._isSenderAllowed(invocation.get_sender()))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]