parent
e5581e342c
commit
ce9947e2b2
@ -0,0 +1,56 @@
|
|||||||
|
From b1be295de28f45762a525d3ad3f91729295a7511 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@redhat.com>
|
||||||
|
Date: Fri, 18 Oct 2024 13:20:23 +0200
|
||||||
|
Subject: [PATCH] shell/window-tracker: Help mutter finding app info's for
|
||||||
|
windows
|
||||||
|
|
||||||
|
---
|
||||||
|
src/shell-window-tracker.c | 25 +++++++++++++++++++++++++
|
||||||
|
1 file changed, 25 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/src/shell-window-tracker.c b/src/shell-window-tracker.c
|
||||||
|
index bc14040d9b..8fbcca4269 100644
|
||||||
|
--- a/src/shell-window-tracker.c
|
||||||
|
+++ b/src/shell-window-tracker.c
|
||||||
|
@@ -651,6 +651,20 @@ shell_window_tracker_on_n_workspaces_changed (MetaWorkspaceManager *workspace_ma
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
+static GAppInfo *
|
||||||
|
+on_find_app_info (MetaDisplay *display,
|
||||||
|
+ MetaWindow *window,
|
||||||
|
+ ShellWindowTracker *tracker)
|
||||||
|
+{
|
||||||
|
+ g_autoptr (ShellApp) app = NULL;
|
||||||
|
+
|
||||||
|
+ app = get_app_for_window (tracker, window);
|
||||||
|
+ if (!app)
|
||||||
|
+ return NULL;
|
||||||
|
+
|
||||||
|
+ return g_object_ref (G_APP_INFO (shell_app_get_app_info (app)));
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
static void
|
||||||
|
init_window_tracking (ShellWindowTracker *self)
|
||||||
|
{
|
||||||
|
@@ -665,6 +679,17 @@ init_window_tracking (ShellWindowTracker *self)
|
||||||
|
g_signal_connect(display, "window-created",
|
||||||
|
G_CALLBACK (on_window_created), self);
|
||||||
|
|
||||||
|
+ if (g_signal_lookup ("find-app-info", META_TYPE_DISPLAY))
|
||||||
|
+ {
|
||||||
|
+ g_debug ("Mutter app finding with the help of gnome-shell");
|
||||||
|
+ g_signal_connect (display, "find-app-info",
|
||||||
|
+ G_CALLBACK (on_find_app_info), self);
|
||||||
|
+ }
|
||||||
|
+ else
|
||||||
|
+ {
|
||||||
|
+ g_debug ("No mutter app finding with the help of gnome-shell");
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
shell_window_tracker_on_n_workspaces_changed (workspace_manager, NULL, self);
|
||||||
|
}
|
||||||
|
|
||||||
|
--
|
||||||
|
2.44.0.501.g19981daefd.dirty
|
||||||
|
|
@ -0,0 +1,107 @@
|
|||||||
|
From 3a89e8597f6f3e7fa468bae93768f8253a3141e7 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
|
||||||
|
Date: Thu, 6 Oct 2022 14:30:20 +0200
|
||||||
|
Subject: [PATCH 1/2] inhibitShortcutsDialog: Don't override resource
|
||||||
|
|
||||||
|
PermissionStore's Set() method takes a complete permission
|
||||||
|
table, so when setting an app's permission, we are implicitly
|
||||||
|
removing all previously set entries for other apps.
|
||||||
|
|
||||||
|
Switch to the SetPermission() method which sets the permission
|
||||||
|
for a single app.
|
||||||
|
|
||||||
|
https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5937
|
||||||
|
|
||||||
|
Part-of:
|
||||||
|
<https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2504>
|
||||||
|
---
|
||||||
|
...g.freedesktop.impl.portal.PermissionStore.xml | 7 +++++++
|
||||||
|
js/ui/inhibitShortcutsDialog.js | 16 ++++++----------
|
||||||
|
2 files changed, 13 insertions(+), 10 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/data/dbus-interfaces/org.freedesktop.impl.portal.PermissionStore.xml b/data/dbus-interfaces/org.freedesktop.impl.portal.PermissionStore.xml
|
||||||
|
index 75fbc468a8..55d3fc30cb 100644
|
||||||
|
--- a/data/dbus-interfaces/org.freedesktop.impl.portal.PermissionStore.xml
|
||||||
|
+++ b/data/dbus-interfaces/org.freedesktop.impl.portal.PermissionStore.xml
|
||||||
|
@@ -13,6 +13,13 @@
|
||||||
|
<arg name="app_permissions" type="a{sas}" direction="in"/>
|
||||||
|
<arg name="data" type="v" direction="in"/>
|
||||||
|
</method>
|
||||||
|
+ <method name="SetPermission">
|
||||||
|
+ <arg name='table' type='s' direction='in'/>
|
||||||
|
+ <arg name='create' type='b' direction='in'/>
|
||||||
|
+ <arg name='id' type='s' direction='in'/>
|
||||||
|
+ <arg name='app' type='s' direction='in'/>
|
||||||
|
+ <arg name='permissions' type='as' direction='in'/>
|
||||||
|
+ </method>
|
||||||
|
<signal name="Changed">
|
||||||
|
<arg name="table" type="s" direction="out"/>
|
||||||
|
<arg name="id" type="s" direction="out"/>
|
||||||
|
diff --git a/js/ui/inhibitShortcutsDialog.js b/js/ui/inhibitShortcutsDialog.js
|
||||||
|
index c59544eaf9..8ef5861261 100644
|
||||||
|
--- a/js/ui/inhibitShortcutsDialog.js
|
||||||
|
+++ b/js/ui/inhibitShortcutsDialog.js
|
||||||
|
@@ -1,5 +1,5 @@
|
||||||
|
/* exported InhibitShortcutsDialog */
|
||||||
|
-const { Clutter, Gio, GLib, GObject, Gtk, Meta, Pango, Shell, St } = imports.gi;
|
||||||
|
+const {Clutter, Gio, GObject, Gtk, Meta, Pango, Shell, St} = imports.gi;
|
||||||
|
|
||||||
|
const Dialog = imports.ui.dialog;
|
||||||
|
const ModalDialog = imports.ui.modalDialog;
|
||||||
|
@@ -57,15 +57,11 @@ var InhibitShortcutsDialog = GObject.registerClass({
|
||||||
|
if (!this._shouldUsePermStore() || this._permStore == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
- let permissions = {};
|
||||||
|
- permissions[this._app.get_id()] = [grant];
|
||||||
|
- let data = GLib.Variant.new('av', {});
|
||||||
|
-
|
||||||
|
- this._permStore.SetRemote(APP_PERMISSIONS_TABLE,
|
||||||
|
- true,
|
||||||
|
- APP_PERMISSIONS_ID,
|
||||||
|
- permissions,
|
||||||
|
- data,
|
||||||
|
+ this._permStore.SetPermissionRemote(APP_PERMISSIONS_TABLE,
|
||||||
|
+ true,
|
||||||
|
+ APP_PERMISSIONS_ID,
|
||||||
|
+ this._app.get_id(),
|
||||||
|
+ [grant],
|
||||||
|
(result, error) => {
|
||||||
|
if (error != null)
|
||||||
|
log(error.message);
|
||||||
|
--
|
||||||
|
2.43.0
|
||||||
|
|
||||||
|
|
||||||
|
From 1391efb2356d1b1eac631df2f5fbd61a7a72bf52 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
|
||||||
|
Date: Fri, 18 Nov 2022 22:40:31 +0100
|
||||||
|
Subject: [PATCH 2/2] inhibitShorcutsDialog: Fix permission check
|
||||||
|
|
||||||
|
Each permission entry is an array of strings, so checking that against
|
||||||
|
the expected string itself will always fail.
|
||||||
|
|
||||||
|
https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6107
|
||||||
|
|
||||||
|
Part-of:
|
||||||
|
<https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2548>
|
||||||
|
---
|
||||||
|
js/ui/inhibitShortcutsDialog.js | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/js/ui/inhibitShortcutsDialog.js b/js/ui/inhibitShortcutsDialog.js
|
||||||
|
index 8ef5861261..4cd2793c3d 100644
|
||||||
|
--- a/js/ui/inhibitShortcutsDialog.js
|
||||||
|
+++ b/js/ui/inhibitShortcutsDialog.js
|
||||||
|
@@ -145,7 +145,7 @@ var InhibitShortcutsDialog = GObject.registerClass({
|
||||||
|
let [permissions] = res;
|
||||||
|
if (permissions[appId] === undefined) // Not found
|
||||||
|
this._dialog.open();
|
||||||
|
- else if (permissions[appId] == GRANTED)
|
||||||
|
+ else if (permissions[appId][0] === GRANTED)
|
||||||
|
this._emitResponse(DialogResponse.ALLOW);
|
||||||
|
else
|
||||||
|
this._emitResponse(DialogResponse.DENY);
|
||||||
|
--
|
||||||
|
2.43.0
|
||||||
|
|
@ -1,51 +0,0 @@
|
|||||||
diff --git a/js/portalHelper/main.js b/js/portalHelper/main.js
|
|
||||||
index 25f866281..a221c3b88 100644
|
|
||||||
--- a/js/portalHelper/main.js
|
|
||||||
+++ b/js/portalHelper/main.js
|
|
||||||
@@ -4,10 +4,17 @@ imports.gi.versions.Soup = '2.4';
|
|
||||||
|
|
||||||
const Format = imports.format;
|
|
||||||
const Gettext = imports.gettext;
|
|
||||||
-const { Gio, GLib, GObject, Gtk, Pango, Soup, WebKit2: WebKit } = imports.gi;
|
|
||||||
+const { Gio, GLib, GObject, Gtk, Pango, Soup } = imports.gi;
|
|
||||||
|
|
||||||
const _ = Gettext.gettext;
|
|
||||||
|
|
||||||
+let WebKit;
|
|
||||||
+try {
|
|
||||||
+ WebKit = imports.gi.WebKit2;
|
|
||||||
+} catch {
|
|
||||||
+ WebKit = null;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
const Config = imports.misc.config;
|
|
||||||
const { loadInterfaceXML } = imports.misc.fileUtils;
|
|
||||||
|
|
||||||
@@ -346,6 +353,11 @@ function initEnvironment() {
|
|
||||||
function main(argv) {
|
|
||||||
initEnvironment();
|
|
||||||
|
|
||||||
+ if (!WebKit) {
|
|
||||||
+ log('WebKit2 typelib is not installed, captive portal helper will be disabled');
|
|
||||||
+ return 1;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
if (!WebKit.WebContext.new_ephemeral) {
|
|
||||||
log('WebKitGTK 2.16 is required for the portal-helper, see https://bugzilla.gnome.org/show_bug.cgi?id=780453');
|
|
||||||
return 1;
|
|
||||||
diff --git a/js/ui/status/network.js b/js/ui/status/network.js
|
|
||||||
index 01c83c86b..8c5bd8dcb 100644
|
|
||||||
--- a/js/ui/status/network.js
|
|
||||||
+++ b/js/ui/status/network.js
|
|
||||||
@@ -2070,7 +2070,9 @@ class Indicator extends PanelMenu.SystemIndicator {
|
|
||||||
new PortalHelperProxy(Gio.DBus.session, 'org.gnome.Shell.PortalHelper',
|
|
||||||
'/org/gnome/Shell/PortalHelper', (proxy, error) => {
|
|
||||||
if (error) {
|
|
||||||
- log('Error launching the portal helper: %s'.format(error));
|
|
||||||
+ // Timeout is expected if WebKit is unavailable
|
|
||||||
+ if (!error.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.TIMED_OUT))
|
|
||||||
+ log('Error launching the portal helper: ' + error);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,34 @@
|
|||||||
|
From b8ae8f713a15b00ec447a23294948fc463220130 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Simon McVittie <smcv@debian.org>
|
||||||
|
Date: Mon, 6 May 2024 21:58:09 +0100
|
||||||
|
Subject: [PATCH] screencast: Correct expected bus name for streams
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
Previously, this only worked because GDBusConnection was not filtering
|
||||||
|
signals by their sender correctly (GNOME/glib#3268).
|
||||||
|
|
||||||
|
Thanks: Alicia Boya García
|
||||||
|
Signed-off-by: Simon McVittie <smcv@debian.org>
|
||||||
|
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3303>
|
||||||
|
---
|
||||||
|
js/dbusServices/screencast/screencastService.js | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/js/dbusServices/screencast/screencastService.js b/js/dbusServices/screencast/screencastService.js
|
||||||
|
index 708a15c84..0321b4d69 100644
|
||||||
|
--- a/js/dbusServices/screencast/screencastService.js
|
||||||
|
+++ b/js/dbusServices/screencast/screencastService.js
|
||||||
|
@@ -161,7 +161,7 @@ var Recorder = class {
|
||||||
|
});
|
||||||
|
|
||||||
|
this._streamProxy = new ScreenCastStreamProxy(Gio.DBus.session,
|
||||||
|
- 'org.gnome.ScreenCast.Stream',
|
||||||
|
+ 'org.gnome.Mutter.ScreenCast',
|
||||||
|
streamPath);
|
||||||
|
|
||||||
|
this._streamProxy.connectSignal('PipeWireStreamAdded',
|
||||||
|
--
|
||||||
|
2.45.0
|
||||||
|
|
Loading…
Reference in new issue