Skip to content
Browse files

middle button paste in exaple pokedit, unfinished

  • Loading branch information...
1 parent 174ba88 commit ca4e75fd9830c63088ad51fcb0864d9f24e4c68f @NotFound committed Dec 13, 2011
Showing with 13 additions and 0 deletions.
  1. +13 −0 examples/pokedit.winxed
View
13 examples/pokedit.winxed
@@ -103,6 +103,7 @@ class TextWindow : ChildWindow
self.OnFocusIn += eventhandler(self, "onfocusin");
self.OnFocusOut += eventhandler(self, "onfocusout");
self.OnKeyPress += eventhandler(self, "onkeypress");
+ self.OnButtonPress += eventhandler(self, "onbuttonpress");
self.OnSelectionNotify += eventhandler(self, "onselectionnotify");
}
function ondestroy(event)
@@ -326,6 +327,18 @@ class TextWindow : ChildWindow
}
self.cursor();
}
+ function onbuttonpress(event)
+ {
+ switch (event.button()) {
+ case 2:
+ // Paste primary selection - unfinished
+ var display = self.display;
+ display.ConvertSelection(XA_PRIMARY,
+ self.InternAtom(UTF8_STRING),
+ XA_PRIMARY, self, event.time());
+ break;
+ }
+ }
function onselectionnotify(event)
{
var display = self.display;

0 comments on commit ca4e75f

Please sign in to comment.
Something went wrong with that request. Please try again.