Bug 1409854

Summary: Cannot copy-paste after inappropriate clipboard target pasting
Product: Red Hat Enterprise Linux 7 Reporter: Radek Duda <rduda>
Component: spice-gtkAssignee: Victor Toso <victortoso>
Status: CLOSED ERRATA QA Contact: SPICE QE bug list <spice-qe-bugs>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 7.4CC: alexus_m, dblechte, pgrunt, rbalakri, rduda, spice-qe-bugs, tpelka, victortoso
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: spice-gtk-0.33-1.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-01 15:04:11 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Radek Duda 2017-01-03 16:06:29 UTC
Description of problem:
If clipboard content with no text target is pasted to the text processor (e.g. gedit) on guest, nothing is pasted - that is ok, but copy-paste function is then somewhat blocked.


Version-Release number of selected component (if applicable):
client:
spice-gtk-0.31-8.el7.x86_64
virt-viewer-2.0-13.el7.x86_64

guest:
virt-viewer-2.0-13.el7.x86_64
spice-server-0.12.4-19.el7.x86_64
spice-vdagent-0.14.0-14.el7.x86_64


How reproducible: always


Steps to Reproduce:
1.Copy anything without text target from Client (e.g. some drawing from LibreOffice Draw)
2.Paste it to text processing application (e.g. Gedit) on Guest (ctrl+v)
3.Copy any text string from client (e.g. in Gedit)
4.Paste it to gedit in Guest

Actual results:
nothing is pasted

Expected results:
text is pasted to Gedit on Guest

Additional info:
If step 3. is substituted by
3. Copy a file in Nautilus (ctrl+c) on Client side,
path of the copied file is immediately pasted into Gedit on Guest (ctrl+v from step 2 is utilized now)



Note for testing:
clipboard content inspection (python):

import gtk
clipboard = gtk.clipboard_get()
clipboard.wait_for_targets()

Comment 1 Victor Toso 2017-02-10 14:54:34 UTC
This seems to be reproducible upstream too (taking in consideration that we will rebase spice-gtk)

There is a distinction between ctrl+c and selection. Following the steps in comment #0, the text selection stop working in step 3, but if you try with ctrl+c (client) and ctrl+v (guest), it works, correct?

This seems to be a client side.

Comment 2 Radek Duda 2017-02-21 13:12:26 UTC
(In reply to Victor Toso from comment #1)
> This seems to be reproducible upstream too (taking in consideration that we
> will rebase spice-gtk)
> 
> There is a distinction between ctrl+c and selection. Following the steps in
> comment #0, the text selection stop working in step 3, but if you try with
> ctrl+c (client) and ctrl+v (guest), it works, correct?
> 
> This seems to be a client side.

No I use only ctrl+c and ctrl+v for copying/pasting

Comment 4 Victor Toso 2017-02-27 10:00:05 UTC
Patch is upstream

gtk-session: always reply to agent's clipboard request
172c521271a3dc6d9ed0c297406c2fa29266682d

Comment 6 Radek Duda 2017-04-12 08:55:15 UTC
Verified using spice-gtk3-0.33-3.el7.x86_64 installed on client/host and attached Test Case.

Comment 7 errata-xmlrpc 2017-08-01 15:04:11 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:1849