Blame SOURCES/gnome-screenshot-40.0-headless-fix.patch

c3b66d
From 97316afbd1e9b0c25de5f87b52d47448ee667bdb Mon Sep 17 00:00:00 2001
c3b66d
From: Sebastian Keller <skeller@gnome.org>
c3b66d
Date: Fri, 12 Nov 2021 22:21:27 +0100
c3b66d
Subject: [PATCH] application: Drop support for non-unique mode in headless
c3b66d
 instance
c3b66d
c3b66d
gnome-shell started allowing only applications that own certain names
c3b66d
on the session bus to interact with the screenshot interface. While the
c3b66d
name used by gnome-screenshot is on the allowed list, non-unique
c3b66d
instances that are used for the headless mode do not own that name. Fix
c3b66d
this by also making the headless instance unique so it will own the
c3b66d
name. This however also means that there can only ever be a single
c3b66d
instance of gnome-screenshot, regardless of headless or interactive.
c3b66d
c3b66d
Fixes: https://gitlab.gnome.org/GNOME/gnome-screenshot/-/issues/179
c3b66d
---
c3b66d
 src/screenshot-application.c | 12 ------------
c3b66d
 1 file changed, 12 deletions(-)
c3b66d
c3b66d
diff --git a/src/screenshot-application.c b/src/screenshot-application.c
c3b66d
index cc663d4..7acdc0e 100644
c3b66d
--- a/src/screenshot-application.c
c3b66d
+++ b/src/screenshot-application.c
c3b66d
@@ -630,18 +630,6 @@ screenshot_application_handle_local_options (GApplication *app,
c3b66d
       exit (EXIT_SUCCESS);
c3b66d
     }
c3b66d
 
c3b66d
-  /* Start headless instances in non-unique mode */
c3b66d
-  if (!g_variant_dict_contains (options, "interactive"))
c3b66d
-    {
c3b66d
-      GApplicationFlags old_flags;
c3b66d
-
c3b66d
-      old_flags = g_application_get_flags (app);
c3b66d
-      if ((old_flags & G_APPLICATION_IS_SERVICE) == 0)
c3b66d
-        {
c3b66d
-          g_application_set_flags (app, old_flags | G_APPLICATION_NON_UNIQUE);
c3b66d
-        }
c3b66d
-    }
c3b66d
-
c3b66d
   return -1;
c3b66d
 }
c3b66d
 
c3b66d
-- 
c3b66d
GitLab
c3b66d