示例#1
0
文件: core.py 项目: rudresh2319/Xpra
 def _read_xshape(self, x=0, y=0):
     if not X11Window.displayHasXShape() or not XSHAPE:
         return {}
     extents = X11Window.XShapeQueryExtents(self.xid)
     if not extents:
         shapelog("read_shape for window %#x: no extents", self.xid)
         return {}
     #w,h = X11Window.getGeometry(xid)[2:4]
     shapelog("read_shape for window %#x: extents=%s", self.xid, extents)
     bextents = extents[0]
     cextents = extents[1]
     if bextents[0]==0 and cextents[0]==0:
         shapelog("read_shape for window %#x: none enabled", self.xid)
         return {}
     v = {
          "x"                : x,
          "y"                : y,
          "Bounding.extents" : bextents,
          "Clip.extents"     : cextents,
          }
     for kind in SHAPE_KIND.keys():
         kind_name = SHAPE_KIND[kind]
         rectangles = X11Window.XShapeGetRectangles(self.xid, kind)
         v[kind_name+".rectangles"] = rectangles
     shapelog("_read_shape()=%s", v)
     return v
示例#2
0
文件: core.py 项目: ljmljz/xpra
 def _read_xshape(self, x=0, y=0):
     if not X11Window.displayHasXShape():
         return {}
     extents = X11Window.XShapeQueryExtents(self.xid)
     if not extents:
         shapelog("read_shape for window %#x: no extents", self.xid)
         return {}
     #w,h = X11Window.getGeometry(xid)[2:4]
     shapelog("read_shape for window %#x: extents=%s", self.xid, extents)
     bextents = extents[0]
     cextents = extents[1]
     if bextents[0]==0 and cextents[0]==0:
         shapelog("read_shape for window %#x: none enabled", self.xid)
         return {}
     v = {
          "x"                : x,
          "y"                : y,
          "Bounding.extents" : bextents,
          "Clip.extents"     : cextents,
          }
     for kind in SHAPE_KIND.keys():
         kind_name = SHAPE_KIND[kind]
         rectangles = X11Window.XShapeGetRectangles(self.xid, kind)
         v[kind_name+".rectangles"] = rectangles
     shapelog("_read_shape()=%s", v)
     return v
示例#3
0
def dump_xshape(xid):
    extents = X11Window.XShapeQueryExtents(xid)
    if not extents:
        print("read_shape for window %#x: no extents" % xid)
        return {}
    v = {}
    bextents = extents[0]
    cextents = extents[1]
    if bextents[0]==0 and cextents[0]==0:
        print("read_shape for window %#x: none enabled" % xid)
        return {}
    v["Bounding.extents"] = bextents
    v["Clip.extents"] = cextents
    for kind in SHAPE_KIND.keys():
        kind_name = SHAPE_KIND[kind]
        rectangles = X11Window.XShapeGetRectangles(xid, kind)
        v[kind_name+".rectangles"] = rectangles
    print("read_shape()=%s" % v)
示例#4
0
def dump_xshape(xid):
    extents = X11Window.XShapeQueryExtents(xid)
    if not extents:
        print("read_shape for window %#x: no extents" % xid)
        return {}
    v = {}
    bextents = extents[0]
    cextents = extents[1]
    if bextents[0] == 0 and cextents[0] == 0:
        print("read_shape for window %#x: none enabled" % xid)
        return {}
    v["Bounding.extents"] = bextents
    v["Clip.extents"] = cextents
    for kind in SHAPE_KIND.keys():
        kind_name = SHAPE_KIND[kind]
        rectangles = X11Window.XShapeGetRectangles(xid, kind)
        v[kind_name + ".rectangles"] = rectangles
    print("read_shape()=%s" % v)
示例#5
0
文件: core.py 项目: rudresh2319/Xpra
 def _read_xshape(self):
     if not X11Window.displayHasXShape():
         return {}
     extents = X11Window.XShapeQueryExtents(self.xid)
     if not extents:
         shapelog("read_shape for window %#x: no extents", self.xid)
         return {}
     v = {}
     #w,h = X11Window.getGeometry(xid)[2:4]
     bextents = extents[0]
     cextents = extents[1]
     if bextents[0] == 0 and cextents[0] == 0:
         shapelog("read_shape for window %#x: none enabled", self.xid)
         return {}
     v["Bounding.extents"] = bextents
     v["Clip.extents"] = cextents
     for kind in SHAPE_KIND.keys():
         kind_name = SHAPE_KIND[kind]
         rectangles = X11Window.XShapeGetRectangles(self.xid, kind)
         v[kind_name + ".rectangles"] = rectangles
     shapelog("_read_shape()=%s", v)
     return v