Skip to content

Commit

Permalink
Use x11 clipboard instead of primary selection
Browse files Browse the repository at this point in the history
  • Loading branch information
mcobzarenco committed Jul 18, 2020
1 parent 8e1b79f commit 06d7378
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/x11.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ impl Clipboard for X11Clipboard {

fn get_string_contents(&self) -> Result<String, ClipboardError> {
Ok(String::from_utf8(self.inner.load(
self.inner.getter.atoms.primary,
self.inner.getter.atoms.clipboard,
self.inner.getter.atoms.utf8_string,
self.inner.getter.atoms.property,
Duration::from_secs(3),
Expand All @@ -40,9 +40,9 @@ impl Clipboard for X11Clipboard {

fn set_string_contents(&self, contents: String) -> Result<(), ClipboardError> {
Ok(self.inner.store(
self.inner.getter.atoms.primary,
self.inner.setter.atoms.clipboard,
self.inner.setter.atoms.utf8_string,
&*contents,
contents,
)?)
}
}

0 comments on commit 06d7378

Please sign in to comment.