from gi.repository import Gtk

def delete_cb(window, event):
    Gtk.main_quit()

def show_window():
    window = Gtk.Window()
    window.set_size_request(200, 200)
    window.connect("delete-event", delete_cb)
    window.show()

# This window shows up in sniff
show_window()
Gtk.main()

# This one does not
show_window()
Gtk.main()
