Compare commits
No commits in common. "c8" and "c9" have entirely different histories.
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
|||||||
SOURCES/gnome-screenshot-3.26.0.tar.xz
|
SOURCES/gnome-screenshot-40.0.tar.xz
|
||||||
|
@ -1 +1 @@
|
|||||||
389b1d0d35f519d7dc6aefd5b98967c2092fe318 SOURCES/gnome-screenshot-3.26.0.tar.xz
|
b71f77c1a10eac54d2e111d87c64ab523b21ffe4 SOURCES/gnome-screenshot-40.0.tar.xz
|
||||||
|
@ -0,0 +1,110 @@
|
|||||||
|
From ca1877d100e05ba1c04ae020c2543b6bd7c5e407 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Carlos Garnacho <carlosg@gnome.org>
|
||||||
|
Date: Fri, 16 Feb 2024 17:55:21 +0100
|
||||||
|
Subject: [PATCH] app: Specify empty filename to let GNOME Shell store in
|
||||||
|
clipboard
|
||||||
|
|
||||||
|
---
|
||||||
|
src/screenshot-application.c | 6 ++++++
|
||||||
|
src/screenshot-backend-shell.c | 15 ++++++++++-----
|
||||||
|
src/screenshot-backend.c | 4 ++--
|
||||||
|
src/screenshot-utils.c | 4 ++++
|
||||||
|
4 files changed, 22 insertions(+), 7 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/screenshot-application.c b/src/screenshot-application.c
|
||||||
|
index f7f5022..eb9cf59 100644
|
||||||
|
--- a/src/screenshot-application.c
|
||||||
|
+++ b/src/screenshot-application.c
|
||||||
|
@@ -486,6 +486,12 @@ finish_take_screenshot (ScreenshotApplication *self)
|
||||||
|
screenshot = screenshot_get_pixbuf (self->rectangle);
|
||||||
|
g_clear_pointer (&self->rectangle, g_free);
|
||||||
|
|
||||||
|
+ if (screenshot == NULL && screenshot_config->copy_to_clipboard)
|
||||||
|
+ {
|
||||||
|
+ g_application_release (G_APPLICATION (self));
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
if (screenshot == NULL)
|
||||||
|
{
|
||||||
|
g_critical ("Unable to capture a screenshot of any window");
|
||||||
|
diff --git a/src/screenshot-backend-shell.c b/src/screenshot-backend-shell.c
|
||||||
|
index 84c5ead..b651311 100644
|
||||||
|
--- a/src/screenshot-backend-shell.c
|
||||||
|
+++ b/src/screenshot-backend-shell.c
|
||||||
|
@@ -38,8 +38,8 @@ G_DEFINE_TYPE_WITH_CODE (ScreenshotBackendShell, screenshot_backend_shell, G_TYP
|
||||||
|
G_IMPLEMENT_INTERFACE (SCREENSHOT_TYPE_BACKEND, screenshot_backend_shell_backend_init))
|
||||||
|
|
||||||
|
static GdkPixbuf *
|
||||||
|
-screenshot_backend_shell_get_pixbuf (ScreenshotBackend *backend,
|
||||||
|
- GdkRectangle *rectangle)
|
||||||
|
+screenshot_backend_shell_get_pixbuf (ScreenshotBackend *backend,
|
||||||
|
+ GdkRectangle *rectangle)
|
||||||
|
{
|
||||||
|
g_autoptr(GError) error = NULL;
|
||||||
|
g_autofree gchar *path = NULL, *filename = NULL, *tmpname = NULL;
|
||||||
|
@@ -51,8 +51,13 @@ screenshot_backend_shell_get_pixbuf (ScreenshotBackend *backend,
|
||||||
|
path = g_build_filename (g_get_user_cache_dir (), "gnome-screenshot", NULL);
|
||||||
|
g_mkdir_with_parents (path, 0700);
|
||||||
|
|
||||||
|
- tmpname = g_strdup_printf ("scr-%d.png", g_random_int ());
|
||||||
|
- filename = g_build_filename (path, tmpname, NULL);
|
||||||
|
+ if (!screenshot_config->copy_to_clipboard)
|
||||||
|
+ {
|
||||||
|
+ tmpname = g_strdup_printf ("scr-%d.png", g_random_int ());
|
||||||
|
+ filename = g_build_filename (path, tmpname, NULL);
|
||||||
|
+ }
|
||||||
|
+ else
|
||||||
|
+ filename = g_strdup ("");
|
||||||
|
|
||||||
|
if (screenshot_config->take_window_shot)
|
||||||
|
{
|
||||||
|
@@ -94,7 +99,7 @@ screenshot_backend_shell_get_pixbuf (ScreenshotBackend *backend,
|
||||||
|
NULL,
|
||||||
|
&error);
|
||||||
|
|
||||||
|
- if (error == NULL)
|
||||||
|
+ if (error == NULL && *filename)
|
||||||
|
{
|
||||||
|
screenshot = gdk_pixbuf_new_from_file (filename, &error);
|
||||||
|
|
||||||
|
diff --git a/src/screenshot-backend.c b/src/screenshot-backend.c
|
||||||
|
index 73b4e5d..026bdcf 100644
|
||||||
|
--- a/src/screenshot-backend.c
|
||||||
|
+++ b/src/screenshot-backend.c
|
||||||
|
@@ -29,8 +29,8 @@ screenshot_backend_default_init (ScreenshotBackendInterface *iface)
|
||||||
|
}
|
||||||
|
|
||||||
|
GdkPixbuf *
|
||||||
|
-screenshot_backend_get_pixbuf (ScreenshotBackend *self,
|
||||||
|
- GdkRectangle *rectangle)
|
||||||
|
+screenshot_backend_get_pixbuf (ScreenshotBackend *self,
|
||||||
|
+ GdkRectangle *rectangle)
|
||||||
|
{
|
||||||
|
ScreenshotBackendInterface *iface;
|
||||||
|
|
||||||
|
diff --git a/src/screenshot-utils.c b/src/screenshot-utils.c
|
||||||
|
index df0b6e9..87929be 100644
|
||||||
|
--- a/src/screenshot-utils.c
|
||||||
|
+++ b/src/screenshot-utils.c
|
||||||
|
@@ -27,6 +27,7 @@
|
||||||
|
#include <glib/gi18n.h>
|
||||||
|
|
||||||
|
#include "screenshot-backend-shell.h"
|
||||||
|
+#include "screenshot-config.h"
|
||||||
|
|
||||||
|
#ifdef HAVE_X11
|
||||||
|
#include "screenshot-backend-x11.h"
|
||||||
|
@@ -47,6 +48,9 @@ screenshot_get_pixbuf (GdkRectangle *rectangle)
|
||||||
|
{
|
||||||
|
backend = screenshot_backend_shell_new ();
|
||||||
|
screenshot = screenshot_backend_get_pixbuf (backend, rectangle);
|
||||||
|
+ if (!screenshot && screenshot_config->copy_to_clipboard)
|
||||||
|
+ return NULL;
|
||||||
|
+
|
||||||
|
if (!screenshot)
|
||||||
|
#ifdef HAVE_X11
|
||||||
|
g_message ("Unable to use GNOME Shell's builtin screenshot interface, "
|
||||||
|
--
|
||||||
|
2.44.0
|
||||||
|
|
45
SOURCES/gnome-screenshot-40.0-headless-fix.patch
Normal file
45
SOURCES/gnome-screenshot-40.0-headless-fix.patch
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
From 97316afbd1e9b0c25de5f87b52d47448ee667bdb Mon Sep 17 00:00:00 2001
|
||||||
|
From: Sebastian Keller <skeller@gnome.org>
|
||||||
|
Date: Fri, 12 Nov 2021 22:21:27 +0100
|
||||||
|
Subject: [PATCH] application: Drop support for non-unique mode in headless
|
||||||
|
instance
|
||||||
|
|
||||||
|
gnome-shell started allowing only applications that own certain names
|
||||||
|
on the session bus to interact with the screenshot interface. While the
|
||||||
|
name used by gnome-screenshot is on the allowed list, non-unique
|
||||||
|
instances that are used for the headless mode do not own that name. Fix
|
||||||
|
this by also making the headless instance unique so it will own the
|
||||||
|
name. This however also means that there can only ever be a single
|
||||||
|
instance of gnome-screenshot, regardless of headless or interactive.
|
||||||
|
|
||||||
|
Fixes: https://gitlab.gnome.org/GNOME/gnome-screenshot/-/issues/179
|
||||||
|
---
|
||||||
|
src/screenshot-application.c | 12 ------------
|
||||||
|
1 file changed, 12 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/screenshot-application.c b/src/screenshot-application.c
|
||||||
|
index cc663d4..7acdc0e 100644
|
||||||
|
--- a/src/screenshot-application.c
|
||||||
|
+++ b/src/screenshot-application.c
|
||||||
|
@@ -630,18 +630,6 @@ screenshot_application_handle_local_options (GApplication *app,
|
||||||
|
exit (EXIT_SUCCESS);
|
||||||
|
}
|
||||||
|
|
||||||
|
- /* Start headless instances in non-unique mode */
|
||||||
|
- if (!g_variant_dict_contains (options, "interactive"))
|
||||||
|
- {
|
||||||
|
- GApplicationFlags old_flags;
|
||||||
|
-
|
||||||
|
- old_flags = g_application_get_flags (app);
|
||||||
|
- if ((old_flags & G_APPLICATION_IS_SERVICE) == 0)
|
||||||
|
- {
|
||||||
|
- g_application_set_flags (app, old_flags | G_APPLICATION_NON_UNIQUE);
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
--
|
||||||
|
GitLab
|
||||||
|
|
@ -1,29 +1,36 @@
|
|||||||
|
%global tarball_version %%(echo %{version} | tr '~' '.')
|
||||||
|
|
||||||
Name: gnome-screenshot
|
Name: gnome-screenshot
|
||||||
Version: 3.26.0
|
Version: 40.0
|
||||||
Release: 3%{?dist}
|
Release: 4%{?dist}.1
|
||||||
Summary: A screenshot utility for GNOME
|
Summary: A screenshot utility for GNOME
|
||||||
|
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
URL: http://www.gnome.org
|
URL: https://gitlab.gnome.org/GNOME/gnome-screenshot
|
||||||
Source0: http://download.gnome.org/sources/gnome-screenshot/3.26/gnome-screenshot-%{version}.tar.xz
|
Source0: https://download.gnome.org/sources/gnome-screenshot/40/gnome-screenshot-%{tarball_version}.tar.xz
|
||||||
|
# https://bugzilla.redhat.com/show_bug.cgi?id=2078976
|
||||||
|
Patch0: gnome-screenshot-40.0-headless-fix.patch
|
||||||
|
|
||||||
BuildRequires: desktop-file-utils
|
Patch1: 0001-app-Specify-empty-filename-to-let-GNOME-Shell-store-.patch
|
||||||
|
|
||||||
|
BuildRequires: gcc
|
||||||
BuildRequires: gettext
|
BuildRequires: gettext
|
||||||
BuildRequires: gtk3-devel
|
|
||||||
BuildRequires: libappstream-glib-devel
|
BuildRequires: libappstream-glib-devel
|
||||||
BuildRequires: libcanberra-devel
|
|
||||||
BuildRequires: meson
|
BuildRequires: meson
|
||||||
|
BuildRequires: pkgconfig(glib-2.0)
|
||||||
Obsoletes: gnome-utils <= 1:3.3
|
BuildRequires: pkgconfig(gtk+-3.0)
|
||||||
Obsoletes: gnome-utils-libs <= 1:3.3
|
BuildRequires: pkgconfig(libcanberra-gtk3)
|
||||||
Obsoletes: gnome-utils-devel <= 1:3.3
|
BuildRequires: pkgconfig(libhandy-1)
|
||||||
|
BuildRequires: pkgconfig(x11)
|
||||||
|
BuildRequires: pkgconfig(xext)
|
||||||
|
BuildRequires: /usr/bin/desktop-file-validate
|
||||||
|
|
||||||
%description
|
%description
|
||||||
gnome-screenshot lets you take pictures of your screen.
|
gnome-screenshot lets you take pictures of your screen.
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%autosetup -p1 -n gnome-screenshot-%{tarball_version}
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
@ -38,20 +45,98 @@ gnome-screenshot lets you take pictures of your screen.
|
|||||||
|
|
||||||
|
|
||||||
%check
|
%check
|
||||||
desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/org.gnome.Screenshot.desktop
|
desktop-file-validate %{buildroot}%{_datadir}/applications/org.gnome.Screenshot.desktop
|
||||||
|
|
||||||
|
|
||||||
%files -f %{name}.lang
|
%files -f %{name}.lang
|
||||||
%license COPYING
|
%license COPYING
|
||||||
%{_bindir}/gnome-screenshot
|
%{_bindir}/gnome-screenshot
|
||||||
%{_datadir}/GConf/gsettings/gnome-screenshot.convert
|
|
||||||
%{_datadir}/metainfo/org.gnome.Screenshot.metainfo.xml
|
%{_datadir}/metainfo/org.gnome.Screenshot.metainfo.xml
|
||||||
%{_datadir}/applications/org.gnome.Screenshot.desktop
|
%{_datadir}/applications/org.gnome.Screenshot.desktop
|
||||||
%{_datadir}/dbus-1/services/org.gnome.Screenshot.service
|
%{_datadir}/dbus-1/services/org.gnome.Screenshot.service
|
||||||
%{_datadir}/glib-2.0/schemas/org.gnome.gnome-screenshot.gschema.xml
|
%{_datadir}/glib-2.0/schemas/org.gnome.gnome-screenshot.gschema.xml
|
||||||
|
%{_datadir}/icons/hicolor/scalable/apps/org.gnome.Screenshot.svg
|
||||||
|
%{_datadir}/icons/hicolor/symbolic/apps/org.gnome.Screenshot-symbolic.svg
|
||||||
%{_mandir}/man1/gnome-screenshot.1*
|
%{_mandir}/man1/gnome-screenshot.1*
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Apr 18 2024 Carlos Garnacho <cgarnach@redhat.com> - 40.0-4.1
|
||||||
|
- Fix pasting into clipboard through CLI (RHEL-25179)
|
||||||
|
|
||||||
|
* Wed Jul 13 2022 David King <amigadave@amigadave.com> - 40.0-4
|
||||||
|
- Fix headless mode (#2078976)
|
||||||
|
|
||||||
|
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 40.0-3
|
||||||
|
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
||||||
|
Related: rhbz#1991688
|
||||||
|
|
||||||
|
* Thu Apr 15 2021 Mohan Boddu <mboddu@redhat.com> - 40.0-2
|
||||||
|
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
||||||
|
|
||||||
|
* Mon Mar 22 2021 Kalev Lember <klember@redhat.com> - 40.0-1
|
||||||
|
- Update to 40.0
|
||||||
|
- Drop old obsoletes
|
||||||
|
|
||||||
|
* Mon Mar 15 2021 Kalev Lember <klember@redhat.com> - 40~rc-1
|
||||||
|
- Update to 40.rc
|
||||||
|
|
||||||
|
* Thu Feb 18 2021 Kalev Lember <klember@redhat.com> - 40~beta-1
|
||||||
|
- Update to 40.beta
|
||||||
|
- Update source URLs
|
||||||
|
|
||||||
|
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.38.0-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Sep 10 2020 Kalev Lember <klember@redhat.com> - 3.38.0-1
|
||||||
|
- Update to 3.38.0
|
||||||
|
|
||||||
|
* Mon Aug 17 2020 Kalev Lember <klember@redhat.com> - 3.37.90-1
|
||||||
|
- Update to 3.37.90
|
||||||
|
|
||||||
|
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.37.1-3
|
||||||
|
- Second attempt - Rebuilt for
|
||||||
|
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||||
|
|
||||||
|
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.37.1-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||||
|
|
||||||
|
* Fri Jun 05 2020 Kalev Lember <klember@redhat.com> - 3.37.1-1
|
||||||
|
- Update to 3.37.1
|
||||||
|
|
||||||
|
* Tue Mar 10 2020 Kalev Lember <klember@redhat.com> - 3.36.0-1
|
||||||
|
- Update to 3.36.0
|
||||||
|
|
||||||
|
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.34.0-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||||
|
|
||||||
|
* Mon Oct 14 2019 Kalev Lember <klember@redhat.com> - 3.34.0-1
|
||||||
|
- Update to 3.34.0
|
||||||
|
|
||||||
|
* Mon Aug 12 2019 Kalev Lember <klember@redhat.com> - 3.33.90-1
|
||||||
|
- Update to 3.33.90
|
||||||
|
|
||||||
|
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.32.0-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||||
|
|
||||||
|
* Fri Mar 15 2019 Kalev Lember <klember@redhat.com> - 3.32.0-1
|
||||||
|
- Update to 3.32.0
|
||||||
|
|
||||||
|
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.30.0-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Sep 06 2018 Kalev Lember <klember@redhat.com> - 3.30.0-1
|
||||||
|
- Update to 3.30.0
|
||||||
|
|
||||||
|
* Mon Aug 13 2018 Kalev Lember <klember@redhat.com> - 3.26.0-6
|
||||||
|
- Use BuildRequires: libappstream-glib-devel instead of appstream
|
||||||
|
|
||||||
|
* Mon Aug 13 2018 Leigh Scott <leigh123linux@googlemail.com> - 3.26.0-5
|
||||||
|
- Add BuildRequires: appstream
|
||||||
|
|
||||||
|
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.26.0-4
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||||
|
|
||||||
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.26.0-3
|
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.26.0-3
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user