Skip to content

Commit

Permalink
#276: honour the "claim clipboard" argument if we can receive clipboa…
Browse files Browse the repository at this point in the history
…rd contents, just don't block owner twice

git-svn-id: https://xpra.org/svn/Xpra/trunk@14720 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Jan 7, 2017
1 parent ee9bfef commit 9a97e10
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/xpra/clipboard/clipboard_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -681,12 +681,13 @@ def got_token(self, targets, target_data, claim):
#not that they want to own the clipboard selection
return
self._have_token = True
if self._can_receive and not self._block_owner_change:
#if we don't claim the selection (can-receive=False),
#we will have to send the token back on owner-change!
self._block_owner_change = True
if self._can_receive:
if not self._block_owner_change:
#if we don't claim the selection (can-receive=False),
#we will have to send the token back on owner-change!
self._block_owner_change = True
glib.idle_add(self.remove_block)
self.claim()
glib.idle_add(self.remove_block)

def remove_block(self, *args):
log("remove_block: %s", self._selection)
Expand Down

0 comments on commit 9a97e10

Please sign in to comment.