Permalink
Browse files

convenience method Window.ConvertSelection

  • Loading branch information...
1 parent 7874333 commit f827668d23d76c85f5da35e5bfb5f6d9d79ba5e9 @NotFound committed Dec 22, 2011
Showing with 17 additions and 3 deletions.
  1. +17 −3 src/Guitor.winxed
View
@@ -423,6 +423,12 @@ class Display
{
return int(getfun("XGetSelectionOwner")(self.xdisplay, selection));
}
+ function _ConvertSelection(int selection, int target, int property,
+ int requestor, int time)
+ {
+ getfun("XConvertSelection")(self.xdisplay, selection, target,
+ property, requestor, time);
+ }
function ConvertSelection(int selection, int target, int property,
requestor, int time)
{
@@ -1682,10 +1688,18 @@ class Window : Drawable
function SetSelectionOwner(int selection, int time)
{
- self.display._SetSelectionOwner(selection, self.xdrawable, time);
+ int xdrawable = self.xdrawable;
+ if (xdrawable != None)
+ self.display._SetSelectionOwner(selection, xdrawable, time);
+ }
+ function ConvertSelection(int selection, int target, int property,
+ int time)
+ {
+ int xdrawable = self.xdrawable;
+ if (xdrawable != None)
+ self.display._ConvertSelection(selection, target, property,
+ xdrawable, time);
}
-
- // Convenience methods that just dispatch to the display of this window
function InternAtom(string name, int only_if_exists[optional])
{
return self.display.InternAtom(name, only_if_exists);

0 comments on commit f827668

Please sign in to comment.