plug-ins: move KDE portal for screenshot as fallback to the X…
… implementation and Freedesktop portal.
This is an alternative to commit ef9c483771
(`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.
This commit is contained in:
@ -201,12 +201,6 @@ run (const gchar *name,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (! backend && screenshot_kwin_available ())
|
|
||||||
{
|
|
||||||
backend = SCREENSHOT_BACKEND_KWIN;
|
|
||||||
capabilities = screenshot_kwin_get_capabilities ();
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef GDK_WINDOWING_X11
|
#ifdef GDK_WINDOWING_X11
|
||||||
if (! backend && screenshot_x11_available ())
|
if (! backend && screenshot_x11_available ())
|
||||||
{
|
{
|
||||||
@ -214,12 +208,18 @@ run (const gchar *name,
|
|||||||
capabilities = screenshot_x11_get_capabilities ();
|
capabilities = screenshot_x11_get_capabilities ();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
else if (! backend && screenshot_freedesktop_available ())
|
if (! backend && screenshot_freedesktop_available ())
|
||||||
{
|
{
|
||||||
backend = SCREENSHOT_BACKEND_FREEDESKTOP;
|
backend = SCREENSHOT_BACKEND_FREEDESKTOP;
|
||||||
capabilities = screenshot_freedesktop_get_capabilities ();
|
capabilities = screenshot_freedesktop_get_capabilities ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (! backend && screenshot_kwin_available ())
|
||||||
|
{
|
||||||
|
backend = SCREENSHOT_BACKEND_KWIN;
|
||||||
|
capabilities = screenshot_kwin_get_capabilities ();
|
||||||
|
}
|
||||||
|
|
||||||
/* how are we running today? */
|
/* how are we running today? */
|
||||||
switch (run_mode)
|
switch (run_mode)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user