Fix selection of text on Wayland
This commit is contained in:
parent
d3e403c054
commit
0e6bace586
42
evince-3.18.2-text-selection.patch
Normal file
42
evince-3.18.2-text-selection.patch
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
From c4130d229816c2bf4734df9535b021052678204b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Marek Kasik <mkasik@redhat.com>
|
||||||
|
Date: Tue, 15 Dec 2015 17:41:33 +0100
|
||||||
|
Subject: [PATCH] Fix selection of text on Wayland
|
||||||
|
|
||||||
|
Do not clear selection if update of the primary selection failed.
|
||||||
|
This is expected to happen on Wayland and other platforms with no primary selection,
|
||||||
|
and just leads to the selected text being cleared after any attempt to change the
|
||||||
|
text selection itself through either mouse/keyboard.
|
||||||
|
|
||||||
|
https://bugzilla.gnome.org/show_bug.cgi?id=759506
|
||||||
|
---
|
||||||
|
libview/ev-view.c | 13 ++++++-------
|
||||||
|
1 file changed, 6 insertions(+), 7 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/libview/ev-view.c b/libview/ev-view.c
|
||||||
|
index 9fa0546..f76eca8 100644
|
||||||
|
--- a/libview/ev-view.c
|
||||||
|
+++ b/libview/ev-view.c
|
||||||
|
@@ -9262,13 +9262,12 @@ ev_view_update_primary_selection (EvView *ev_view)
|
||||||
|
gtk_target_list_add_text_targets (target_list, 0);
|
||||||
|
targets = gtk_target_table_new_from_list (target_list, &n_targets);
|
||||||
|
gtk_target_list_unref (target_list);
|
||||||
|
-
|
||||||
|
- if (!gtk_clipboard_set_with_owner (clipboard,
|
||||||
|
- targets, n_targets,
|
||||||
|
- ev_view_primary_get_cb,
|
||||||
|
- ev_view_primary_clear_cb,
|
||||||
|
- G_OBJECT (ev_view)))
|
||||||
|
- ev_view_primary_clear_cb (clipboard, ev_view);
|
||||||
|
+
|
||||||
|
+ gtk_clipboard_set_with_owner (clipboard,
|
||||||
|
+ targets, n_targets,
|
||||||
|
+ ev_view_primary_get_cb,
|
||||||
|
+ ev_view_primary_clear_cb,
|
||||||
|
+ G_OBJECT (ev_view));
|
||||||
|
|
||||||
|
gtk_target_table_free (targets, n_targets);
|
||||||
|
} else {
|
||||||
|
--
|
||||||
|
2.5.0
|
||||||
|
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
Name: evince
|
Name: evince
|
||||||
Version: 3.18.2
|
Version: 3.18.2
|
||||||
Release: 2%{?dist}
|
Release: 3%{?dist}
|
||||||
Summary: Document viewer
|
Summary: Document viewer
|
||||||
|
|
||||||
License: GPLv2+ and GPLv3+ and LGPLv2+ and MIT and Afmparse
|
License: GPLv2+ and GPLv3+ and LGPLv2+ and MIT and Afmparse
|
||||||
@ -14,6 +14,7 @@ URL: https://wiki.gnome.org/Apps/Evince
|
|||||||
Source0: http://download.gnome.org/sources/%{name}/3.18/%{name}-%{version}.tar.xz
|
Source0: http://download.gnome.org/sources/%{name}/3.18/%{name}-%{version}.tar.xz
|
||||||
Patch1: evince-3.17.2-check-to-avoid-crash.patch
|
Patch1: evince-3.17.2-check-to-avoid-crash.patch
|
||||||
Patch2: evince-3.18.2-symbolic-app-icon.patch
|
Patch2: evince-3.18.2-symbolic-app-icon.patch
|
||||||
|
Patch3: evince-3.18.2-text-selection.patch
|
||||||
|
|
||||||
BuildRequires: pkgconfig(adwaita-icon-theme)
|
BuildRequires: pkgconfig(adwaita-icon-theme)
|
||||||
BuildRequires: pkgconfig(gio-unix-2.0) >= %{glib2_version}
|
BuildRequires: pkgconfig(gio-unix-2.0) >= %{glib2_version}
|
||||||
@ -124,6 +125,7 @@ This package contains the evince web browser plugin.
|
|||||||
%setup -q
|
%setup -q
|
||||||
%patch1 -p1 -b .check-to-avoid-crash
|
%patch1 -p1 -b .check-to-avoid-crash
|
||||||
%patch2 -p1 -b .symbolic-app-icon
|
%patch2 -p1 -b .symbolic-app-icon
|
||||||
|
%patch3 -p1 -b .text-selection
|
||||||
|
|
||||||
%build
|
%build
|
||||||
./autogen.sh
|
./autogen.sh
|
||||||
@ -266,6 +268,9 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas >&/dev/null ||:
|
|||||||
%{_libdir}/mozilla/plugins/libevbrowserplugin.so
|
%{_libdir}/mozilla/plugins/libevbrowserplugin.so
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Dec 15 2015 Marek Kasik <mkasik@redhat.com> - 3.18.2-3
|
||||||
|
- Fix selection of text on Wayland
|
||||||
|
|
||||||
* Thu Nov 19 2015 Michael Catanzaro <mcatanzaro@gnome.org> - 3.18.2-2
|
* Thu Nov 19 2015 Michael Catanzaro <mcatanzaro@gnome.org> - 3.18.2-2
|
||||||
- Fix installation of symbolic app icon
|
- Fix installation of symbolic app icon
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user