Permalink
Browse files

restore request primary selection in example pokedit

  • Loading branch information...
1 parent 114bf1a commit 5574567d5e32ab97a8be3e1eddf5d1abc027052c @NotFound committed Dec 18, 2011
Showing with 8 additions and 2 deletions.
  1. +8 −2 examples/pokedit.winxed
View
@@ -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) {

0 comments on commit 5574567

Please sign in to comment.