[gimp/nielsdg/remove-gnome-shell: 7/7] screenshot: Remove GNOME Shell implementation




commit 62953e6830391aa67140f8417021fa4f4917899f
Author: Niels De Graef <nielsdegraef gmail com>
Date:   Wed Dec 8 13:17:21 2021 +0100

    screenshot: Remove GNOME Shell implementation
    
    GNOME Shell has started restricting access for it's Screenshot D-Bus API
    to internal components only [1] for security reasons. In other words,
    this will start failing, so remove it in favor of just using the
    freedesktop portal, which should always work.
    
    [1]: https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1970

 plug-ins/screenshot/Makefile.am              |   2 -
 plug-ins/screenshot/meson.build              |   1 -
 plug-ins/screenshot/screenshot-gnome-shell.c | 211 ---------------------------
 plug-ins/screenshot/screenshot-gnome-shell.h |  32 ----
 plug-ins/screenshot/screenshot.c             |  12 +-
 5 files changed, 2 insertions(+), 256 deletions(-)
---
diff --git a/plug-ins/screenshot/Makefile.am b/plug-ins/screenshot/Makefile.am
index 0d8d829f21..3db7e5bc1b 100644
--- a/plug-ins/screenshot/Makefile.am
+++ b/plug-ins/screenshot/Makefile.am
@@ -48,8 +48,6 @@ screenshot_SOURCES = \
        screenshot.h                            \
        screenshot-freedesktop.c                \
        screenshot-freedesktop.h                \
-       screenshot-gnome-shell.c                \
-       screenshot-gnome-shell.h                \
        screenshot-icon.h                       \
        screenshot-kwin.c                       \
        screenshot-kwin.h                       \
diff --git a/plug-ins/screenshot/meson.build b/plug-ins/screenshot/meson.build
index b4c0e4eb63..467fe23401 100644
--- a/plug-ins/screenshot/meson.build
+++ b/plug-ins/screenshot/meson.build
@@ -2,7 +2,6 @@ plugin_name = 'screenshot'
 
 plugin_sources = [
   'screenshot-freedesktop.c',
-  'screenshot-gnome-shell.c',
   'screenshot-kwin.c',
   'screenshot-osx.c',
   'screenshot-win32.c',
diff --git a/plug-ins/screenshot/screenshot.c b/plug-ins/screenshot/screenshot.c
index 33878b0d02..2c5241a863 100644
--- a/plug-ins/screenshot/screenshot.c
+++ b/plug-ins/screenshot/screenshot.c
@@ -28,7 +28,6 @@
 
 #include "screenshot.h"
 #include "screenshot-freedesktop.h"
-#include "screenshot-gnome-shell.h"
 #include "screenshot-icon.h"
 #include "screenshot-kwin.h"
 #include "screenshot-osx.h"
@@ -151,7 +150,7 @@ screenshot_create_procedure (GimpPlugIn  *plug_in,
          "passed as a parameter.  The last four parameters "
          "are optional and can be used to specify the corners "
          "of the region to be grabbed."
-         "On Mac OS X or on gnome-shell, "
+         "On Mac OS X, "
          "when called non-interactively, the plug-in"
          "only can take screenshots of the entire root window."
          "Grabbing a window or a region is not supported"
@@ -256,12 +255,7 @@ screenshot_run (GimpProcedure        *procedure,
     }
 #endif
 
-  if (! backend && screenshot_gnome_shell_available ())
-    {
-      backend      = SCREENSHOT_BACKEND_GNOME_SHELL;
-      capabilities = screenshot_gnome_shell_get_capabilities ();
-    }
-  else if (! backend && screenshot_kwin_available ())
+  if (! backend && screenshot_kwin_available ())
     {
       backend      = SCREENSHOT_BACKEND_KWIN;
       capabilities = screenshot_kwin_get_capabilities ();
@@ -432,8 +426,6 @@ shoot (GdkMonitor  *monitor,
 
   if (backend == SCREENSHOT_BACKEND_FREEDESKTOP)
     return screenshot_freedesktop_shoot (&shootvals, monitor, image, error);
-  else if (backend == SCREENSHOT_BACKEND_GNOME_SHELL)
-    return screenshot_gnome_shell_shoot (&shootvals, monitor, image, error);
   else if (backend == SCREENSHOT_BACKEND_KWIN)
     return screenshot_kwin_shoot (&shootvals, monitor, image, error);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]