vncviewer: fix clipboard check incorrectly rejecting PRIMARY selections
Resolves: RHEL-192138
This commit is contained in:
parent
d72fcf6bf9
commit
54c3e592d2
@ -0,0 +1,29 @@
|
||||
From 763c9d1a80b0333cc248d78e135309013dd68f9f Mon Sep 17 00:00:00 2001
|
||||
From: Jan Grulich <jgrulich@redhat.com>
|
||||
Date: Fri, 31 Jul 2026 13:42:48 +0200
|
||||
Subject: [PATCH] vncviewer: fix clipboard check incorrectly rejecting PRIMARY
|
||||
selections
|
||||
|
||||
Fl::clipboard_contains() doesn't query PRIMARY selection. When text is
|
||||
selected, the clipboard notify is sent with source=0 (PRIMARY), but the
|
||||
check performed by Fl::clipboard_contains() might be checking clipboard
|
||||
which may be empty, causing a false "Got non-plain text" rejection.
|
||||
|
||||
Fixes #2129
|
||||
---
|
||||
vncviewer/Viewport.cxx | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/vncviewer/Viewport.cxx b/vncviewer/Viewport.cxx
|
||||
index 251b5ece5a..c3919f4d06 100644
|
||||
--- a/vncviewer/Viewport.cxx
|
||||
+++ b/vncviewer/Viewport.cxx
|
||||
@@ -595,7 +595,7 @@ void Viewport::handleClipboardChange(int source, void *data)
|
||||
return;
|
||||
#endif
|
||||
|
||||
- if (!Fl::clipboard_contains(Fl::clipboard_plain_text)) {
|
||||
+ if (source != 0 && !Fl::clipboard_contains(Fl::clipboard_plain_text)) {
|
||||
vlog.debug("Got non-plain text in local clipboard, ignoring.");
|
||||
// Reset the state as if we don't have any clipboard data at all
|
||||
self->pendingClientClipboard = false;
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
Name: tigervnc
|
||||
Version: 1.16.2
|
||||
Release: 3%{?dist}
|
||||
Release: 4%{?dist}
|
||||
Summary: A TigerVNC remote display system
|
||||
|
||||
%global _hardened_build 1
|
||||
@ -31,6 +31,8 @@ Patch3: tigervnc-add-option-allowing-to-connect-only-user-owning-session
|
||||
Patch4: tigervnc-allow-use-of-passwords-longer-than-eight-characters.patch
|
||||
|
||||
# Upstream patches
|
||||
# https://github.com/TigerVNC/tigervnc/pull/2135
|
||||
Patch10: tigervnc-vncviewer-fix-clipboard-check-incorrectly-rejecting-primary-selection.patch
|
||||
|
||||
# Upstreamable patches
|
||||
|
||||
@ -209,6 +211,7 @@ popd
|
||||
%patch -P4 -p1 -b .allow-use-of-passwords-longer-than-eight-characters
|
||||
|
||||
# Upstream patches
|
||||
%patch -P10 -p1 -b .vncviewer-fix-clipboard-check-incorrectly-rejecting-primary-selection
|
||||
|
||||
# Upstreamable patches
|
||||
|
||||
@ -388,6 +391,10 @@ fi
|
||||
%ghost %verify(not md5 size mode mtime) %{_sharedstatedir}/selinux/%{selinuxtype}/active/modules/200/%{modulename}
|
||||
|
||||
%changelog
|
||||
* Thu Aug 06 2026 Jan Grulich <jgrulich@redhat.com> - 1.16.2-4
|
||||
- vncviewer: fix clipboard check incorrectly rejecting PRIMARY selections
|
||||
Resolves: RHEL-192138
|
||||
|
||||
* Thu Jun 25 2026 Jan Grulich <jgrulich@redhat.com> - 1.16.2-3
|
||||
- Rebuild for updated xorg-x11-server
|
||||
Resolves: RHEL-184004
|
||||
|
||||
Loading…
Reference in New Issue
Block a user