[gimp/gimp-2-10] plug-ins: move KDE portal for screenshot as fallback to the X…



commit 1ba2e11c91780ea99b51eb3dff4d4f9fb6f15cb9
Author: Jehan <jehan girinstud io>
Date:   Fri Dec 17 20:24:23 2021 +0100

    plug-ins: move KDE portal for screenshot as fallback to the X…
    
    … implementation and Freedesktop portal.
    
    This is an alternative to commit ef9c4837711 (`master` branch) for the
    2.10 series. On the dev branch, we simply get rid of the KDE portal
    implementation, on the basis that by the time that GIMP 3 gets released,
    most KDE users will have a recent-enough KDE with featureful Freedesktop
    portal.
    
    Yet for the 2.10 series, I am wary that there might still be many KDE
    installations where maybe there is not even a Freedesktop portal. So I
    just switch the test order. Now we use the X implementation in priority,
    if we are running in X (it's still the most featureful and robust
    version anyway). Then we test the Freedesktop portal. And finally we
    test the KDE portal. I am guessing that if we encounter a KDE
    installation with no Freedesktop portal but a KDE one, it's an old
    version so we won't have permission issues.
    
    See issue #5785.

 plug-ins/screenshot/screenshot.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/plug-ins/screenshot/screenshot.c b/plug-ins/screenshot/screenshot.c
index 26e575c2b9..73601f460d 100644
--- a/plug-ins/screenshot/screenshot.c
+++ b/plug-ins/screenshot/screenshot.c
@@ -201,12 +201,6 @@ run (const gchar      *name,
     }
 #endif
 
-  if (! backend && screenshot_kwin_available ())
-    {
-      backend      = SCREENSHOT_BACKEND_KWIN;
-      capabilities = screenshot_kwin_get_capabilities ();
-    }
-
 #ifdef GDK_WINDOWING_X11
   if (! backend && screenshot_x11_available ())
     {
@@ -214,12 +208,18 @@ run (const gchar      *name,
       capabilities = screenshot_x11_get_capabilities ();
     }
 #endif
-  else if (! backend && screenshot_freedesktop_available ())
+  if (! backend && screenshot_freedesktop_available ())
     {
       backend      = SCREENSHOT_BACKEND_FREEDESKTOP;
       capabilities = screenshot_freedesktop_get_capabilities ();
     }
 
+  if (! backend && screenshot_kwin_available ())
+    {
+      backend      = SCREENSHOT_BACKEND_KWIN;
+      capabilities = screenshot_kwin_get_capabilities ();
+    }
+
   /* how are we running today? */
   switch (run_mode)
     {


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