Skip to content

Commit

Permalink
#276: fix "clipboard-direction" control command:
Browse files Browse the repository at this point in the history
* fix clipboard_helper location (no client here, cut&pasted wrong..)
* add debug logging
* accept case insensitive values
* return message to client

git-svn-id: https://xpra.org/svn/Xpra/trunk@13942 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Oct 1, 2016
1 parent b91dfab commit 2418383
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/xpra/server/server_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1696,11 +1696,16 @@ def control_command_encoding(self, encoding, *args):
def control_command_clipboard_direction(self, direction, *args):
ch = self._clipboard_helper
assert self.supports_clipboard and ch
assert direction in ("to-server", "to-client", "both", "disabled")
direction = direction.lower()
DIRECTIONS = ("to-server", "to-client", "both", "disabled")
assert direction in DIRECTIONS, "invalid direction '%s', must be one of %s" % (direction, csv(DIRECTIONS))
self.clipboard_direction = direction
can_send = direction in ("to-server", "both")
can_receive = direction in ("to-client", "both")
self.client.clipboard_helper.set_direction(can_send, can_receive)
self._clipboard_helper.set_direction(can_send, can_receive)
msg = "clipboard direction set to '%s'" % direction
clipboardlog(msg)
return msg

def _control_video_subregions_from_wid(self, wid):
if wid not in self._id_to_window:
Expand Down

0 comments on commit 2418383

Please sign in to comment.