def show(self): OSDWindow.show(self) from ctypes import byref pb = self.b.get_pixbuf() win = X.XID(self.get_window().get_xid()) pixmap = X.create_pixmap(self.xdisplay, win, pb.get_width(), pb.get_height(), 1) width = pb.get_width() height = pb.get_height() self.f.move(self.cursor, int(width / 2), int(height / 2)) gc = X.create_gc(self.xdisplay, pixmap, 0, None) X.set_foreground(self.xdisplay, gc, 0) X.fill_rectangle(self.xdisplay, pixmap, gc, 0, 0, pb.get_width(), pb.get_height()) X.set_foreground(self.xdisplay, gc, 1) X.set_background(self.xdisplay, gc, 1) r = int(pb.get_width() * 0.985) x = (pb.get_width() - r) / 2 X.fill_arc(self.xdisplay, pixmap, gc, x, x, r, r, 0, 360*64) X.flush_gc(self.xdisplay, gc) X.flush(self.xdisplay) X.shape_combine_mask(self.xdisplay, win, X.SHAPE_BOUNDING, 0, 0, pixmap, X.SHAPE_SET) X.flush(self.xdisplay)