コード例 #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
ファイル: dump_xshape.py プロジェクト: ljmljz/xpra
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
ファイル: dump_xshape.py プロジェクト: tardyp/Xpra
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