#!/usr/bin/python

from gi.repository import Gtk

popup = Gtk.Window(type=Gtk.WindowType.POPUP)
popup.set_default_size(300, 300)
label = Gtk.Label(label="\o/ "*10)
popup.add(label)
label.show()


window = Gtk.Window(title="Helllloooo")
window.set_default_size(300, 300)
button = Gtk.Button(label="Click Me")

def button_cb(*args):
    if popup.get_visible():
        popup.hide()
        #popup.unrealize()
    else:
        popup.show_all()

button.connect("clicked", button_cb)
window.add(button)


window.show_all()
window.connect("destroy", lambda *x: Gtk.main_quit())
Gtk.main()
