Skip to content

Commit

Permalink
#3229 fix clipboard copy with rencodeplus
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed Sep 17, 2021
1 parent e8b5a47 commit 953d724
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion xpra/x11/gtk_x11/clipboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
constants, PropertyError, #@UnresolvedImport
X11WindowBindings, #@UnresolvedImport
)
from xpra.os_util import bytestostr
from xpra.os_util import bytestostr, strtobytes
from xpra.util import csv, repr_ellipsized, ellipsizer, first_time
from xpra.log import Logger

Expand Down Expand Up @@ -460,6 +460,10 @@ def set_selection_response(self, requestor, target, prop, dtype, dformat, data,
return
with xsync:
if data is not None:
if isinstance(data, str):
#the data is already in the correct format,
#but the cython bindings require real 'bytes'
data = strtobytes(data)
X11Window.XChangeProperty(xid, prop, dtype, dformat, data)
else:
#maybe even delete the property?
Expand Down

0 comments on commit 953d724

Please sign in to comment.