Skip to content

Commit ca4e75f

Browse files
committed
middle button paste in exaple pokedit, unfinished
1 parent 174ba88 commit ca4e75f

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

examples/pokedit.winxed

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ class TextWindow : ChildWindow
103103
self.OnFocusIn += eventhandler(self, "onfocusin");
104104
self.OnFocusOut += eventhandler(self, "onfocusout");
105105
self.OnKeyPress += eventhandler(self, "onkeypress");
106+
self.OnButtonPress += eventhandler(self, "onbuttonpress");
106107
self.OnSelectionNotify += eventhandler(self, "onselectionnotify");
107108
}
108109
function ondestroy(event)
@@ -326,6 +327,18 @@ class TextWindow : ChildWindow
326327
}
327328
self.cursor();
328329
}
330+
function onbuttonpress(event)
331+
{
332+
switch (event.button()) {
333+
case 2:
334+
// Paste primary selection - unfinished
335+
var display = self.display;
336+
display.ConvertSelection(XA_PRIMARY,
337+
self.InternAtom(UTF8_STRING),
338+
XA_PRIMARY, self, event.time());
339+
break;
340+
}
341+
}
329342
function onselectionnotify(event)
330343
{
331344
var display = self.display;

0 commit comments

Comments
 (0)