def do_xpra_shape_event(self, event): shapelog("shape event: %s, kind=%s", event, SHAPE_KIND.get(event.kind, event.kind)) cur_shape = self.get_property("shape") if cur_shape and cur_shape.get("serial", 0)>=event.serial: shapelog("same or older xshape serial no: %#x (current=%#x)", event.serial, cur_shape.get("serial", 0)) return #remove serial before comparing dicts: try: cur_shape["serial"] except: pass #read new xshape: with xswallow: #should we pass the x and y offsets here? #v = self._read_xshape(event.x, event.y) if event.shaped: v = self._read_xshape() else: v = {} if cur_shape==v: shapelog("xshape unchanged") return v["serial"] = int(event.serial) shapelog("xshape updated with serial %#x", event.serial) self._internal_set_property("shape", v)
def do_xpra_shape_event(self, event): shapelog("shape event: %s, kind=%s", event, SHAPE_KIND.get(event.kind, event.kind)) cur_shape = self.get_property("shape") if cur_shape and cur_shape.get("serial", 0)>=event.serial: shapelog("same or older xshape serial no: %#x", event.serial) return #remove serial before comparing dicts: try: cur_shape["serial"] except: pass #read new xshape: with xswallow: v = self._read_xshape() if cur_shape==v: shapelog("xshape unchanged") return v["serial"] = int(event.serial) shapelog("xshape updated with serial %#x", event.serial) self._internal_set_property("shape", v)
def do_xpra_shape_event(self, event): shapelog("shape event: %s, kind=%s", event, SHAPE_KIND.get(event.kind, event.kind)) cur_shape = self.get_property("shape") if cur_shape and cur_shape.get("serial", 0) >= event.serial: shapelog("same or older xshape serial no: %#x", event.serial) return #remove serial before comparing dicts: try: cur_shape["serial"] except: pass #read new xshape: with xswallow: v = self._read_xshape() if cur_shape == v: shapelog("xshape unchanged") return v["serial"] = int(event.serial) shapelog("xshape updated with serial %#x", event.serial) self._internal_set_property("shape", v)