Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

restore request primary selection in example pokedit

  • Loading branch information...
commit 5574567d5e32ab97a8be3e1eddf5d1abc027052c 1 parent 114bf1a
@NotFound authored
Showing with 8 additions and 2 deletions.
  1. +8 −2 examples/pokedit.winxed
View
10 examples/pokedit.winxed
@@ -925,8 +925,14 @@ class TextWindow : ChildWindow
}
else if (target == typeutf8 || target == XA_STRING) {
// Request for text: fine, do it.
- var copybuffer = self.copybuffer;
- string textsel = copybuffer == null ? "" : copybuffer;
+ string textsel;
+ if (selection == XA_PRIMARY)
+ textsel = self.getselectedtext();
+ else {
+ // Assume CLIPBOARD
+ var copybuffer = self.copybuffer;
+ textsel = copybuffer == null ? "" : copybuffer;
+ }
// Some clients can request STRING without checking.
// Try to transcode in that case.
if (target == XA_STRING) {
Please sign in to comment.
Something went wrong with that request. Please try again.