Skip to content

Commit

Permalink
use the clipboard selection
Browse files Browse the repository at this point in the history
Use the clipboard selection which makes copy paste between apps work.
  • Loading branch information
stuartmarsden committed Mar 18, 2015
1 parent f7402f6 commit 6cdb783
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kivy/core/clipboard/clipboard_xsel.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
class Clipboardxsel(ClipboardBase):

def get(self, mimetype='text/plain'):
p = subprocess.Popen(['xsel'], stdout=subprocess.PIPE)
p = subprocess.Popen(['xsel', 'b'], stdout=subprocess.PIPE)
data, _ = p.communicate()
return data

def put(self, data, mimetype='text/plain'):
p = subprocess.Popen(['xsel', '-i'], stdin=subprocess.PIPE)
p = subprocess.Popen(['xsel', '-bi'], stdin=subprocess.PIPE)
p.communicate(data)

def get_types(self):
Expand Down

0 comments on commit 6cdb783

Please sign in to comment.