Skip to content

Commit

Permalink
local copy of 'targets' should always be a list of strings
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@22500 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Apr 22, 2019
1 parent 1772244 commit 9b125a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/xpra/x11/gtk_x11/clipboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def xatoms_to_strings(data):
def strings_to_xatoms(data):
with xsync:
atom_array = tuple(X11Window.get_xatom(atom) for atom in data if atom)
return struct.pack(b"@" + b"L" * len(atom_array), *atom_array)
return struct.pack(b"@"+b"L"*len(atom_array), *atom_array)


class X11Clipboard(ClipboardTimeoutHelper, gobject.GObject):
Expand Down Expand Up @@ -551,7 +551,7 @@ def do_property_notify(self, event):
return
log("%s=%s (%s : %s)", event.atom, repr_ellipsized(bytestostr(data)), dtype, dformat)
if target=="TARGETS":
self.targets = data or ()
self.targets = xatoms_to_strings(data or b"")
self.got_local_contents(target, dtype, dformat, data)

def got_local_contents(self, target, dtype=None, dformat=None, data=None):
Expand Down

0 comments on commit 9b125a2

Please sign in to comment.