cr.fill()

def main(argc):
    win = gtk.Window()
win.set_decorated(False)
win.set_app_paintable(True)
win.set_size_request(100, 100)
screen = win.get_screen()
rgba = screen.get_rgba_colormap()
win.set_colormap(rgba)
win.connect('expose-event', expose)
win.show()
How to get transparent background in window with PyGTK and PyCairo?